Navigation:  Admin Panel > Forms > Field List >

Calculation options

Previous pageReturn to chapter overviewNext page

This is a brief summary of the calculation options:
 
  IFEMPTY (returns first arg that is not NULL or empty)

  IFZERO (returns first arg that is not 0)

  IIF (When arg1 true then return arg2, else return arg3)

  CONCAT (Concat all args)

  FORMAT (format args (arg2, arg3, ...) according to specification in arg1)

  TONUMBER (convert arg1 to a decimal. If arg1 is invalid and arg2 is given than return arg2)

  ROUND  (round decimal in arg1 to integer, or to a decimal with arg2 decimals if arg2 is provided. Arg3 is optional and can contain "floor" or "ceiling" as rounding types, but ONLY works if arg2=0.

  REPLACE (search in arg1 for arg2, and replace all occurrences to arg3. It works with a string as well.replace

  example: REPLACE('#REPLACE-FORMFIELD-Granular Access : form 1||textfield1||#', ' ', '%20')

 

  SUBSTRING  (Display in the substring arg1 from position (0-based) in arg2 for the length of arg3 (or until the end of the string if arg3 is empty )

  INDEXOF (Geeft positie (0-based) terug in arg1 van arg2

  TODATE (convert arg1 to a date, according to user culture, if arg2 is given, use that format, if arg3 is given, that is the default return value by default

  DATEDIFF (show difference between arg1 (earliest) and arg2 (last) specified in unit in arg3 (D,H,m,s)

  DATEADD (add arg2 units to date in arg1. Arg3 = unit: Y, M, D, h, m, s.Use Format to return in a string)

  NOW (returns current datetime as a datetime variable. Use Format to return in a string)

  IsDayLightSavingActive (Returns Boolean containing True if daylight saving is active in the current server timezone. Arg1 is a datetime to check on, so you can also use NOW() as arg1)

  GetUtcOffset (Returns number containing difference in hours between local server timezone and UTC time for datetime in Arg1. Eg for Brussels, the result will be 2 for a datetime in May, and 1 for a datetime in December)

  WebserviceLookup (arg1 is the webservice name, arg2 is the field you want to retrieve (use empty string when fetching scalar), arg(n)-arg(n+1) are the filter fields)

  HtmlEncode (HTML Encodes the string in arg1)

 

More up-to-date information can be found on the Wiki: http://wiki3.smt-x.com/index.php?title=FormTips