/api/formula
Module | Services | Data types | Constants |
---|---|---|---|
formula | FormulaService |
FieldReference Formula FormulaError FormulaNode FormulaToken NodeContent NumberToken OpName OpNotation OpSignature Operation StringToken Symbol ValidateResult |
None | 0 |
no operator for this function; it must be written as a function call eg SUM(x, y, z)
|
Infix | 1 |
the operator appears between two operands; eg X + Y
|
Prefix | 2 |
the operator appears before a single operand; eg -X
|
Postfix | 3 |
the operator appears after its operand; eg X²
|
Grouping | 4 |
the operator groups an expression; eg the parens in (X + Y) * 2
|
Postcircumfix | 5 |
the operator follows a term (presently symbols/function names only) and encloses another term
|
Separator | 6 |
the operator is used to separate arguments in a list
|
Add | 1 | |
Subtract | 2 | |
Multiply | 3 | |
Divide | 4 |
Base type: string
Base type: string
Base type: string
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | returnType | field_data.FieldType | the return type of the function when called in this way | default | |
2 | argTypes | list< | an acceptable list of argument types | default | |
3 | varArgs | bool | the function can take a variable number of arguments/terms; the final argument can be provided 0 or more times. | default | false |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | operationName | OpName | default | ||
2 | description | string | a short description of the operation eg "add two numbers together" (localized) - intended for tooltips etc | default | |
3 | notation | OpNotation | the "notation" defines where the operator appears in relation to its arguments | default | |
4 | precedence | i32 | in the absense of parentheses, this indicates the priority of the operator. Lower numbers mean more tightly binding (eg, × has a lower value than +) | default | -1 |
5 | signatures | list< | valid types for the arguments and return values of this operation | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | fieldType | field_data.FieldType | the type of the field, the same as the type on the field.Field | default | |
2 | fieldClientId | string | in template authoring, this field contains the referenced field using the client Id | optional | |
3 | fieldId | string | specifying field by step.Field.id instead. Always set on steps in materialized jobs | optional | |
4 | fieldTitle | string | set on the template version of a formula; this is the title of the input referred to. Broken references retain this value. | optional | |
5 | stepClientId | string | optional | ||
6 | jobBaseStepId | string | optional | ||
7 | stepTitle | string | set on the template version of a formula with inter-step references; this is the title of the step referred to. Broken references retain this value. | optional |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | op | OpName | default | ||
2 | num | NumberToken | default | ||
3 | str | StringToken | default | ||
4 | ref | FieldReference | default | ||
5 | sym | Symbol | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | value | field_data.ExecutionData | the value is an "immediate" value, and re-uses the type of field execution data | default | |
2 | fieldRef | FieldReference | the value is a reference to another field's input value | default | |
3 | operationName | OpName | the value is a result of calling the named function | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | content | NodeContent | the content of this node - string or reference | default | |
2 | nodeType | field_data.FieldType | the return type of this formula node | default | |
3 | funcArgs | list< | if a function node, the parameters/arguments to the function | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | errorMessage | string | localized message | default | |
2 | errorPos | i32 | position in the list of tokens where the error is | optional |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | formulaTokens | list< | list of tokens for expression | default | |
2 | expr | FormulaNode | compiled form (set if valid) | optional | |
3 | error | FormulaError | lerror description (if not valid) | optional |
Get a current list of available formula operations. This includes functions and operators. It's generally fixed across all teams, except for functions still in beta testing. You can omit teamId to only get production-ready operations available to everyone.list<
getOperations(Operation
>common.UUID
teamId) throwscommon.SystemException
ValidateResult
validateFormula(list<
formulaTokens) throwsFormulaToken
>common.SystemException