Available translations

Record Formula

foundations.png
record-formula.png
In the context of a record definition, formulas are used to assign a value to the property, usually in the form of a variable declared in the calculation or data building procedures.
Foundations->Node->Record Definition->Record Properties
What are the Record Properties used for?
In general this is the mechanism to define what information is going to be available to the consumers of data of this product.
When properties don't have a Formula, they define the format of the file that stores this data on disk. These record properties defines, the data type (string, number, etc), and in which order the data is saved. At the file there are no headers, just the data, because the header information is available here, for any process writing or reading the data from disk.
The formulas nodes there are used to expand the record definition adding fields that are not actually going to be saved on disk, to minimize space used, and they are going to be calculated at runtime. This allows processes that consume this data to have ell the fields available at runtime even though some were not actually saved on disk.
How is a Record Formula used?
Formulas may use both the record and the variable objects made available by the calculations procedure and the data building procedure (see procedure loop).
A formula may act in slightly different ways depending on the isCalculated attribute in the record property configuration:
  • When a property is calculated, the formula assigns to the property a value that is calculated in the Calculations Procedure. Even if the property is not stored in the dataset, it is made available as a calculated property to other bots that may have the dataset as input.
  • When a property is not calculated or the attribute is not defined in the configuration, the formula is applied in the Data Building Procedure.
Record Formula Menu
The Record Formula node has the following Node Menu items:
The Edit menu item has the following properties:
  • action: Edit
  • label: Edit
  • iconPathOn: javascript-code
  • iconPathOff: javascript-code
  • dontShowAtFullscreen: true
  • actionFunction: uiObject.formulaEditor.activate
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
  • actionFunction: payload.executeAction
Record Formula Attaching Rules
The following are the Node Attaching Rules that govern the attachment of Record Formula with other nodes:
Compatible Types:
Record Formula Formula
This section explores Record Formula Node Code.
Initial Value
The initial value for Record Formula is:
 "// Type your formula"
Examples
This is a list of examples used on the Record Formula code, collected from this workspace.