Skip to main content

Build an expression

Using the Item Form Expression Builder

When you create or edit an expression, the Item Form Expression Builder appears. Drag the canvas to pan around and scroll to zoom.

An overview of the Item Form Expressions Builder with key points numbered

1 Name

To set the name of the expression, select Edit. We recommend making it a concise description of what the expression does, so it can be clearly identified in a list.

2 Node types

Nodes are the building blocks of your expression. Each node represents a function or a value. Values can be static, dynamically linked to a control property, or dynamically linked to a global variable, e.g. the current user's name.

To add a node to the canvas, select a type in the app bar:

  • Conditionals - logical functions that test inputs from other nodes and produce corresponding output.

  • Finals - the expression's output, which will be applied to any control property that targets it.

  • Globals - references to the dynamic value of a control property or a global variable.

  • Literals - static values that you input yourself.

  • Transforms - functions that modify an input value, producing a new value.

  • Dates - functions for creating or manipulating date values.

  • Date Times - functions for creating or manipulating date and time values.

For the full list, see Expression nodes.

3 Tools

Select a tool in the app bar:

  • Delete - delete the currently selected node or link.

  • Organise - automatically arrange nodes into formation based on how they're linked.

4 Added nodes

Nodes appear on the canvas as purple boxes, displaying their type and a description of what they do. Drag each node into position and use its bottom-right corner to resize it. To set the value of a node, select its Edit button.

A global String node added to the canvas

For a Global node, select the field to show compatible control properties and global variables. Choose one to use as a dynamic value.

List of global variables
Global VariableDescriptionGlobal Node Type
User Alloy IDThe ID of the current userAlloy ID Array
Item IDThe ID of the item being create/editedAlloy ID Array
Parent item IDThe IDs of any parent items that link to the item being created/editedAlloy ID Array
Create modeIs the item form being used to create an item?Boolean
Edit modeIs the item form being used to edit an item?Boolean
Date NowThe current dateDate
Date Time NowThe current date and timeDate Time
UsernameThe username of the current userString
First nameThe first name of the current userString
Last nameThe last name of the current userString
EmailThe email address of the current userString
Customer nameThe name of your companyString
Item form nameThe name of the current item formString
Item form contextThe context of the current item formString
Design nameThe design name of the item being created/editedString
Design contextThe design context of the item being created/editedString
Item iconThe icon code of the item being created/editedString
Item signatureThe signature of the item being edited (changes with every edit)String
Item collectionThe Guc of the collection of the item being created/editedIsTriggering
Item form codeThe Guc of the current item formIsTriggering
Design codeThe Guc of the design of the item being created/editedIsTriggering
Edit dialog for a Global String node with an empty Global Value field.

For a Literal node, enter a value. Depending on the node type, either type directly into the field, choose a value from a picker, use the AQS Builder, or toggle the field to indicate true or false.

Edit dialog for a Literal String node with a populated Value field.

Define your expression by linking the inputs and outputs of different nodes on the canvas:

  • Each node has one or more input circles on their left side. They're labelled to help you understand the type of input expected.

  • Each node has one output circle on their right side (except for final nodes).

To join two nodes together, select an output circle on the first node, and then select an input circle on the second node. When you select a circle, only compatible circles will remain undimmed, so only valid links can be made.

An AQS Transform node displaying three input circles and one output circle
info

All possible execution paths within the expression should end with a final node.

6 Save button

When you're finished, select Save to save your expression and return to the Item Form Builder. To leave without saving, select in the top-right corner.