Formula Builder screen

Lets you configure a formula to do math calculations for your eForm and it's form controls..

Figure: Formula Builder screen

Formula Builder screen

Examples

How to Start

  1. Open eForm Builder.

    For information about how to open this screen, refer to eForm Builder screen.


    Eform Builder screen
  2. On the Advanced Controls tab, drag a Formula Formula icon form control onto your eForm.

    Formula Form Control
  3. Complete the fields as necessary.

    Genearl tab
  4. On the eForm Builder screen, click the Formula form control, and click Formula.

    Click Formula icon

Fields

Field NameDefinition

Formula

Description:
Specifies the formula with the form control, functions, and logical operators to run in the eForm.
Allowed Values:
  • A valid formula or expression.

    You can create a formula or expression using function, operators, fileds, and process data variables.

Default Value:
None
Example:
${Expenses/ExpenseAmount:[this]}*${Expenses/ConversionRate:[this]}

Also refer to:

Fields/Tokens

Description:
Specifies the form control or token to associate with the formula.
Allowed Values:
A valid form control or token from the list.
Default Value:
  • user:username
  • user:domainname
Example:
Refer to:

Operators

Description:
Specifies the operator to use in the formula.
Allowed Values:
  • +
  • -
  • *
  • /
  • %
  • <=
  • <
  • >=
  • >
  • !=
  • =
  • &&
  • ||
Default Value:
None
Example:
Refer to:

Keywords

Description:
Shows the list of keywords to use in the formula to show specific values on the eForm.
Allowed Values:
  • randomstring - Let's you use a random alphanumeric string on the eForm which can be used to validate the form user.
  • now - Let's you use the current day in the formula.
  • days - Let's you use the current day as a number. For example, Sunday is 0, Monday is 1 and so on.
  • months - Let's you use the month in the formula.
  • years- Let's you use the year in the formula.
Default Value:
  • randomstring
  • now
  • days
  • months
  • years

Functions

Description:
Shows the list of functions to use in the formula to do specific actions on the eForm.
Allowed Values:
  • datediff - Gets the difference in hours, minutes, seconds, days, weeks, or months between two dates.
  • sum - Gives the sum of a group of numbers.
  • avg - Gives the mean of a specified numbers.
  • dow - Gets the number of week days from a specified date.
  • moy - Gives the number of the month from a specified date.
  • getYear - Gives the year from a specified date.
  • getTime - Gives the time in millisecond (ms) from a specified date
  • getHours - Gives the number of hours from a specified date.
  • getMinutes - Gives the number of minutes from a specified date.
  • getSeconds - Gives the number of seconds from a specified date.
  • instr - Searches a string for a substring using characters and returns the position in the string that is the first character of a specified occurrence of the substring.
  • lowerstr - Changes the capital letters of a specified string expression to small letters.
  • upperstr - Changes the small letters of a specified string expression to capital letters.
  • substr - Gives the characters in a string that starts at the specified location, and ends at the specified number of characters.
  • if - Specifies an if condition.
  • decimal - Gives a number in decimal format.
  • max - Gives the largest number of the specified numbers.
  • min - Gives the smallest number of the specified numbers.
  • pow - Gives the specified number increased to the specified power.
  • floor - Gives the largest integer number that is smaller than or equal to the specified number.
  • round - Rounds the decimal value to the nearest integer.
  • trunc - Gives the integer part of a specified by removing the decimals.
  • abs - Gives the absolute value of a specified number.
Default Value:
None
Example:
Refer to:
Limitations:

The moy, getYear, getTime, getHours, getMinutes, getSeconds, avg, max, min, pow, floor, round, trunc, and abs options are available in these releases: