******************************************************************** * Description.......: btcc_Container.BTC_ValStr: method to convert value into literal string representation * Calling Samples...: * Parameter List....: value_arg, tlShowCrit * Created by........: MDA * Modified by.......: Nadya Nosonovsky 10/04/2001 02:03:31 PM ******************************************************************** * * Added this stub method for support of type-specific subclasses. * This function returns a literal value suitable for inclusion in search criterion. * Type-specific subclasses should override this method as necessary. lparameters value_arg, tlShowCrit && takes 2 arguments (last one is optional argument) * value_arg: value of textbox control to be converted into literal. local lcRetVal, lcType * return value converted a literal lcType= vartype(m.value_arg) do case case m.lcType ='C' if left(alltrim(m.value_arg),1)='"' && First character is already " lcRetVal= alltrim(m.value_arg) else lcRetVal= '"' + alltrim(m.value_arg) + '"' && default treats values as character strings endif case m.lcType = "D" local dTosVal * check for empty date special case - doesn't like strict date syntax if empty(m.value_arg) lcRetVal ='{}' && most concise notation for empty date else * return value converted a literal, using strict date format to avoid annoying errors dTosVal = dtos(m.value_arg) && character-string date in a yyyymmdd format lcRetVal = '{^' + substr(m.dTosVal, 1, 4) ; + '-' + substr(m.dTosVal, 5, 2) ; + '-' + substr(m.dTosVal, 7, 2) ; + '}' && default treats values as character strings endif otherwise if m.tlShowCrit && Price, Mortgage, etc. lcRetVal=alltrim(transform(m.value_arg,"@$ 999,999,999,999")) else lcRetVal=transform(m.value_arg) endif endcase return m.lcRetVal