Trigger Action - Execute Binding
You can use triggers to run bindings for you. Before you begin, you need to have created the necessary fields and applied bindings. Depending on your business requirements this can be as simple as converting a date of birth field to an age, or calculating the total and tax on an order.
You can run bindings on this table or another one. If you are using another table, be sure that you have created it and tested it by adding at least one record.
Most of the time you will want to execute your bindings on the form while it is being filled out by your customer. But there are situations where you might need that binding to run again, without the form being opened and saved again. That's when you need to create a trigger action to run your bindings.
For example, suppose you use the update values trigger to update a numeric value in a specific record (like adding up all purchases by a user and using the SUM option to store the total of all orders with the user's record). And suppose that you have a binding on that form that calculates the user's "Rewards Level" based on their "Total Purchases". The only way to get that trigger to run and update the "Rewards Level" field to reflect the change in the "Total Purchases" would be to open the form/record and then save it again. But by using this Execute Binding Trigger action, you can force that re-evaluation and update the field programmatically.
- On the Trigger Actions panel, click "Add New Trigger Action". Depending on your starting point, you may need to select a profile, click "Edit Trigger Profile", and then click the Actions tab.
- Click Execute Binding and click Next.
- Note the description of this trigger and click Next. The "Execute Binding Trigger Action Wizard" appears.
- In the Action Name field, enter a descriptive name for this action.
- Click Edit Rule and use the standard Logiforms Rule screen to select one or more fields and their settings that determine when this action will be run.
- Click Next. The Binding Setup panel appears.
- In the "Binding Source Form" field, click and choose the form that you want this action performed on.
- In the Binding Field dropdown list, select the field from the form already selected that defines the binding to execute.
- Click Edit Lookup to use the standard Logiforms rule screen to select one or more fields and their settings that determine when this binding action will be run.
- Click Next. The "Binding Result Handling" panel appears.
Here you set up where the results of the binding are to be saved. Depending on the option you choose, other fields may appear on this screen.
|Property||Results When Set to True||Next Step|
|Update Source Form||Updates the source table and field defined on previous screen||Click Finish.|
|Update Alternate Form||Updates a field in another table using a lookup rule||Click the Alternate Form field to choose the form, next in the "Alt Form Binding Field" choose the field in that form with the binding rule, then click Edit Lookup and use the standard Logiforms rule page to create a rule for when this binding is run, and finally click Finish.|
|Update Current Form||Updates the current form||Click the Current Form field to choose the field within the current form that will be updated with the binding result, then click Finish.|
Click Finish. The Trigger Actions panel appears with the name of this action listed.
Click Finish to return to the Trigger Profiles panel or click "Add New Trigger Action" to add another action to this profile.
If you need to edit or delete a trigger action or profile, see Managing Triggers.