![]()
Datawindow objects allow to work with expressions
In Variant generator, unit of measurement calculation and in other areas for formulas DataWindow-Syntax is used. This is to give a short overview of available functions. Further details see Powerbuilder-description available in the Internet.
Mathematical symbols (operators) 
 
 Auxiliary symbols 
 
 - The formula must be logical, '('must be followed by')' etc. - Any level of nesting is permitted.  | 
  | 
<%PROGRAMNAME%> also permits the use of logical formulas with the following structure: 
 if ( logic , value by true , value by false) e.g. if ( red = blue , 3.34 * x , 0 ) + (x * 2) 
 Logical characters and functions 
 
 LIKE works with placeholders: % Any number of characters _ Any single character 
 Example: 'c%' corresponds to any string beginning with c 'c_' corresponds to any string beginning with c and containing one additional arbitrary character  | 
Conditions can be linked with AND and OR as well as with NOT AND/OR: 
 if ( x = y and x = z ,1,0) if ( x = y or x = z,1,0) if ( x = y and not x = z,1,0)  | 
With case different results can be returned depending on a condition. 
 case ( column when value1 then result1 { when value2 then result2 { ... } } { else resultelse } ) 
 case (marriage_status when 'S' then 'Single' when 'M' then 'Married' else 'Unknown')  | 
Characters can be processed. Characters are combined through + 
 a = "Adam" b = "Eve" a + " " + b = "Adam Eve" 
 Beginning and end of a string must be identified. The following are permitted as identifier fields: " "Hello World" ' 'Hello World' [.] [Hello World] 
 The use of identifier fields in string fields is permitted if the string begins with a different identifier field: 
 "[Hello] 'World'" Result: [Hello] 'World' 
 There are many character editing functions 
  |