Ultimate Forms components can be broadly divided into two categories:
- Front-end components - visible to user, they help enter and view data. Forms, column types, Calendar, Print and Charts (and some others) belong to this category.
- Back-end components - execute business logic behind the scenes, configured by administrators and usually invisible to end users. Actions, Alerts, Import and Item ID are some of these components.
Back-end components are usually executed indirectly (although for most manual execution options are available as well). Triggers for execution can be various events (whenever an item is added, modified or deleted) and timer-based triggers (2 days before due date or every 15 minutes). As you can see, front-end and back-end components normally do not interact directly, but through changes in data: forms update the data and that triggers some back-end execution.
In some scenarios however we do want to trigger actions directly from the form, without relying on events. For example, some event types do not exist in SharePoint list, such as the common requirement of logging when users view an item. Another reason could be that the list undergoes frequent massive automatic updates, that would cause the actions to be throttled when used with events.
We now support triggering actions in two ways:
- Via buttons - there is a new button type "Trigger action"
- Via form events (such as form opened/close and item added/modified)
I'm going to present an example of form-triggered action. We are going to increment a number column "Views" each time someone open the item in Edit or Display form.
- Create a simple list and add a number column called Views.
- Click on Design from the toolbar of the list, then click on Actions.
- We are adding and Update list item action that is going to increment Views column value (Views + 1)
- Under Action settings we will enter Views = [Views]+1, this is our formula.
- Under General settings make sure to uncheck all event types. We are going to be triggering this action from the form, so we don't want it to then trigger again through events.
- Once we've created our action, let's design our form. Click on Form Designer and create a form similar to this:
- We will set permissions on Views column to make it hidden in New form and read-only in Edit and Display forms, as we don't want users to modify its value directly.
- Now, click on Actions button on the top toolbar.
- Here select our action under Form is opened event. Note that you can of course use Form is closed as well, but note that it will not execute the user simply closed the browser or navigates to another page without using buttons.
- Publish the form and create our first test item in the list.
- Open the item for display a few times and see the Views counter updated (allow a few seconds for the action to run, it is not immediate).
I'm sure you will find this new feature useful for various scenarios you are implementing using Ultimate Forms!
Add your comment
100% No-Code Solution
It's never been easier, to create, innovate and share, all you need is your web browser!
Address business process pain points immediately. Save time and money.
Fantastic Support Team
Facing difficulties installing the application? Contact our fantastic support team.