Sub-grid client calculations

Client calculations are executed directly on request sub-grid form in user browser. In case there is client calculation it is immediately triggered when values that are part of client calculation change their values (action key down / up or value change in case of non-text controls). These calculations are executed in relational deterministic order based on definition so if calculation A is using field B that is used on field C then first it is calculation value B and after that the value A.

String calculations

Calculations are allowed for object types: combo-box, combo-box with search, text-box and multi line text-box.

Syntax and supported functions:

  • Calculation type: Client-String

  • idXXX - link to sub-grid line

  • {idXXXm} - link to object line from request for Default value

  • idXXXm - link to object line from request for Calculations

  • idXXXr - used in combobox of any type will return the Name of a value

  • “text” - string text

  • Operators:

    • Concatenate of the strings:
      • idXXX + idYYY + “text” + idAAAm
      • idXXX and idYYY are ids of the sub-grid line and idAAAm is from request itself
        if you want to add some text then close the text into double quotes
  • Substring function

    • substring(idXXX, Y, Z)
    • idXXX is id of the sub-grid line
    • Y - starting position (starting from 1)
    • Z - length (starting from 1)

Example string calculations: id123 + id456 + “_text” + substring(id789,1,10)

Math Calculations

Similar as client string calculation Xeelo has also client string calculation used to work with arimethic operations.

Syntax and supported functions:

  • Calculation type: Client-Math
    • idXXX - link to sub-grid line value
    • {idXXXm} - link to object line from request for Default value
    • idXXXm - link to object line from request for Calculations
  • Operators:
    • +
    • -
    • /
    • *
    • ( )

Example math calculations: (id123 + id456) * id76 + 2.34

Client-DateDiff calculation

Client-DateDiff

Function returns value - difference between two Dates in Xeelo format.

Syntax

  • interval,idXXX,idYYY - example: day,idXXX,idYYY
  • interval - date interval as text: day, month, year
  • idXXX - object line with first date
  • idYYY - object line with second date

Client Delay & Calculation Confirmation

Client Delay provides a new feature that allows to set delay for calculation (in milliseconds). It is necessary to set delay to Object Line which has been calculated.

Example: Calculation Math id1234 + 100 = id656. If the delay for line1 is set, the delay will execute calculation after period of time.

Note:Default delay for calculation is 250ms.

Client Confirmation provides a new feature that is represented by green button next to the calculated Object Line. Client Confirmation must be set on the first line of calculation (same like Client Delay). If the button is clicked, the calculation is calculated.

Note: The calculation is NOT executed automatically! User has to click on the button.

Note

Try limit the number of client calculations at minimum. In case of high number and complex calculations it can slow down the response of the client browser as all is executed on client hardware.