IMPORTANT The Runtime Version must be set to Vega (2.0) to use the Operations Builder with Vega-compatible components. Or, use Cross-Runtime Support in a Panel component to access the Operations Builder in the Centauri runtime.
Configuring Operations in Non-Logic Components
Configuring the Operations Builder is a multi-step process that begins with selecting an event, then configuring operations for that event. Once you've configured at least one operation, the Operations Builder tool lets you edit existing configurations, add additional events and operations, and adjust the order of execution.
TIP To learn more about Centauri and Vega-supported components, view our Introduction to Vega article.
To configure operations in a component:
1.
In the Module Builder, hover over a Vega-compatible component.
A 6-button toolbar displays above the component on hover-over.
In the Select an Event | ▾ field, enter or select an event from the list.
4.
Click Add. The New Operation configuration menu displays.
5.
In the Operation Summary field, enter a description of what the operation will do.
6.
In the Operation Type field, enter or select an operation to execute when the event occurs.
7.
Depending on the operation, configure the remaining fields. Settings marked with an asterisk must be completed before you can save the operation.
8.
Click Save Operation. The operation displays in the Operations Builder configuration window as a new row. The Operation Type and Operation Summary values display inside the row.
9.
(Optional) To configure another operation for the same event, click + Add Operation.
10.
(Optional) To configure another event, enter or select an event from the Select an Event | ▾ field.
Configuring Operations in the Initializer Component
Unlike non-logic components, the Initializer component's Operations Builder event is set by the Trigger Type setting. Each row in the Initializer component's Outputs table uses the same event determined by the Trigger type. But, multiple operations can be assigned to that event.
NOTE Regardless of the Trigger Type setting, triggering the Initializer component also executes any operations configured in the Outputs table.
To configure operations in an Initializer component:
1.
Drag and drop an Initializer component onto the canvas. Or, open the configuration menu of an existing Initializer component.
2.
In the component's navigation menu, select Actions.
3.
Under Outputs table's Property ID field, enter or select the Property ID you want to execute an operation against.
NOTE A Property ID is not required for a Vega Operation.
4.
In the Type field, enter or select vegaOperation. In the Value field, the Operations Builder button displays.
IMPORTANT If a value already exists in the Value field, and it is not a compatible Vega operation, then an error icon displays. To fix this issue, change the Type to a different value. Then, remove the existing value in the Value field. Set the Type value back to vegaOperation to display the Operations Builder button.
5.
Click Operations Builder. The Operations Builder modal displays.
6.
In the Operation Summary field, enter a description of what the operation will do.
7.
In the Operation Type field, enter or select an operation to execute when the event occurs.
8.
Depending on the operation, configure the remaining fields. Settings marked with an asterisk must be completed before you can save the operation.
9.
Click Save Operation. The operation displays in the Operations Builder configuration window as a new row. The Operation Type and Summary display inside the row.
10.
(Optional) To configure another operation for the same event, click + Add Operation.
11.
Click Save & Close to close the Operations Builder modal.
12.
Click Save & Close to close the Initializer component's configuration menu.
The Operations Builder offers endless combinations between events and operations. In this example, an end-user needs to add additional rows to a table. You'll use the Operations Builder to configure a Button component to add a new row on button-click.
Configure the Vega Table Component
Configure a Vega Table component with fields the end-user must complete. Then, you'll configure a Button component using the Operations Builder.
1.
In the Module Builder, drop and drop a Vega Table component onto the canvas.
Configure a Button component to execute the Add a Row operation when it emits the On Click event. When end-users click the button, it adds a row to the bottom of the clientsTable Vega Table component.
1.
Drag and drop a Button component onto the canvas, placing it below the clientsTable Vega Table component.
In the Select an Event | ▾ field, enter or select the On Click event.
10.
Click Add. The New Operation configuration menu displays.
11.
In the Operation Summary field, enter Add a new row to the bottom of the clientsTable Vega Table.
12.
In the Operation Type field, enter or select Table Add Row.
13.
In the Target Key field, enter or select clientsTable.
14.
In the Target Index* field, set String to Number.
15.
In the field to the right of the Number field, enter 1.
16.
Click Save Operation to close the New Operation window. The operation displays in the Operations Builder configuration window as a new row. The Operation Type and Operation Summary values display inside the row.
17.
Click Save & Close to close the Operations Builder modal.
In the Initializer component's configuration menu, use the Output table's Property ID field as a reference for what the operations are targeting. For example, if you are using Vega Table operations, enter the Vega Table component's Property ID in the Output table's Property ID field.