Item form expression node types
Build an expression out of nodes
The Item Form Expression Builder provides various types of expression node that you can add to the canvas. Each node represents a value or a function. By connecting the inputs and outputs of added nodes, you can build an expression that outputs a final value.
Value nodes
The following node types can store a static or dynamic value.
Literals
Use literal nodes to store static values that you enter yourself. They can't take input from other nodes or be referenced outside of the expression. You can connect their output circle to one or more other nodes.
Icon | Name | Description | Input type | Output type |
---|---|---|---|---|
Alloy ID | Store a single Item ID code, e.g. 64c00830822ba1843892951b | None | AlloyId | |
AQS | Store an AQS query, which fetches qualifying items and attribute data | None | AqsJson | |
Alloy ID Array | Store multiple Item ID codes, e.g. [64c00830822ba1843892951b, 645e38ab2c320b06983ec02e] | None | AlloyId[] | |
Boolean | Store a value that's true or false | None | boolean | |
Date | Store a date, e.g. 02 July 2023 | None | date | |
Date Time | Store a date and time, e.g. 02 July 2023 13:30:00 PM | None | datetime | |
Number | Store an integer or decimal number, e.g. 230, 3.1415 | None | number | |
String | Store a string of text, e.g. Hasta la vista, baby! | None | string |
Globals
Use global nodes to reference dynamic values. They can link to the value of a control property on the item form, or a global Alloy variable (e.g. the current time). They can't take input from other nodes. You can connect their output circle to one or more other nodes.
Icon | Name | Description | Input type | Output type |
---|---|---|---|---|
AQS | Store a reference to an AQS query | None | AqsJson | |
Alloy ID Array | Store a reference to an array of Item ID codes | None | AlloyId[] | |
Boolean | Store a reference to a value that's true or false | None | boolean | |
Date | Store a reference to a date | None | date | |
Date Time | Store a reference to a date and time | None | datetime | |
Is Triggering | Outputs true if the referenced value is what caused the expression to be (re)calculated | None | boolean | |
Number | Store a reference to an integer or decimal number | None | number | |
String | Store a reference to a string of text | None | string |
Finals
Use a final node to represent the output of the expression. If there are multiple possible branches of execution, they should all end with a final node. The outputted value will be applied to any control property that targets the expression, whenever the expression is (re)calculated.
Icon | Name | Description | Input type | Output type |
---|---|---|---|---|
Alloy ID | Output a single Item ID code | AlloyId | None | |
AQS | Output an AQS query | AqsJson | None | |
Alloy ID Array | Output multiple Item ID codes | AlloyId[] | None | |
Boolean | Output a value that's true or false | boolean | None | |
Date | Output a date | date | None | |
Date Time | Output a date and time | datetime | None | |
Number | Output an integer or decimal number | number | None | |
String | Output a string of text | string | None |
Function nodes
The following node types receive input from other nodes, perform a function, and then produce an output.
Conditionals
Use conditional nodes to test one or more inputs and produce a corresponding output:
Output true if the condition is fulfilled and false if it isn't
Icon | Name | Description | Input types | Output type |
---|---|---|---|---|
Equals | If the two input values are equal, output true | All except AqsJson | boolean | |
Not Equals | If the two input values are not equal, output true | All except AqsJson | boolean | |
AND | If both input values are true, output true | boolean | boolean | |
Contains | If input A contains a character sequence matching input B, output true | A: AlloyId[] , string B: AlloyId , AlloyId[] , string | boolean | |
Greater Than | If input A is greater than input B, output true | date , datetime , number | boolean | |
Greater Than Inclusive | if input A is greater than or equal to input B, output true | date , datetime , number | boolean | |
Is Null | If the input is null (no value received), output true | All | boolean | |
Less Than | If input A is less than input B, output true | date , datetime , number | boolean | |
Less Than Inclusive | If input A is less than or equal to input B, output true | date , datetime , number | boolean | |
Match | If input A contains any matches for the regular expression stored in input B, output true | string | boolean | |
OR | If at least one input value is true, output true | boolean | boolean |
Output one of two inputs, depending on whether the condition is true or false
Icon | Name | Description | Input types | Output type |
---|---|---|---|---|
Alloy ID | Output one of two Alloy IDs, depending on the input condition | Inputs: AlloyId Condition: boolean | AlloyId | |
Alloy ID Array | Output one of two Alloy ID Arrays, depending on the input condition | Inputs: AlloyId[] Condition: boolean | AlloyId[] | |
AQS | Output one of two AQS queries, depending on the input condition | Inputs: AqsJson Condition: boolean | AqsJson | |
Boolean | Output one of two booleans, depending on the input condition | Inputs: boolean Condition: boolean | boolean | |
Date | Output one of two dates, depending on the input condition | Inputs: date Condition: boolean | date | |
Date Time | Output one of two date and times, depending on the input condition | Inputs: datetime Condition: boolean | datetime | |
Number | Output one of two numbers, depending on the input condition | Inputs: number Condition: boolean | number | |
String | Output one of two strings, depending on the input condition | Inputs: string Condition: boolean | string |
Transforms
Use transform nodes to modify an input value and output the new value.
Icon | Name | Description | Input types | Output type |
---|---|---|---|---|
AQS Set Parameter | Modify an AQS query by assigning a value to the named parameter (useful for cascading lookups) | Input: AqsJson ParameterName: string ParameterValue: AlloyId[] , boolean , date , datetime , number , string | AqsJson |
Dates
Use date nodes to create or manipulate a date value.
Icon | Name | Description | Input types | Output type |
---|---|---|---|---|
Add | Add one or more input units (years, months, days) to the input date | Input: date Units: number | date | |
Create | Create a date from the input units (year, month, day) | number | date | |
Day | Get the day of the input date, e.g. 1 to 31 | date | number | |
Days Difference | Calculate the number of days between the two input dates | date | number | |
Month | Get the month of the input date, e.g. 1 to 12 | date | number | |
Subtract | Subtract one or more input units (years, months, days) from the input date | Input: date Units: number | date | |
Year | Get the year of the input date | Input: date Units: number | date |
Date Times
Use date time nodes to create or manipulate a date and time value.
Icon | Name | Description | Input types | Output type |
---|---|---|---|---|
Add | Add one or more input units (years, months, days, hours, minutes, seconds, milliseconds) to the input date and time | Input: datetime Units: number | datetime | |
Create | Create a date and time from the input units (years, months, days, hours, minutes, seconds, milliseconds) | number | datetime | |
Milliseconds Difference | Calculate the number of milliseconds between the two input date and times | datetime | number | |
Hour | Get the hour of the input date and time, e.g. 0 to 23 | datetime | number | |
Minute | Get the minutes of the input date and time, e.g. 0 to 59 | datetime | number | |
Second | Get the seconds of the input date and time, e.g. 0 to 59 | datetime | number | |
Millisecond | Get the milliseconds of the input date and time, e.g. 0 to 999 | datetime | number | |
Subtract | Subtract one or more input units (years, months, days, hours, minutes, seconds, milliseconds) from the input date and time | Input: datetime Units: number | datetime |