Now that you're familiar with the basics of creating a 2-Step Workflow using the Process Field.
We'll look deeper into the 3-Step Workflow and formulas used to control read-only and visibility properties at different process steps. And, Form Connector run conditions to push data to external systems step depending, as opposed to every time the form is uploaded and sent to another user as a task.
This article references our Examples Catalog > How Tos > 3-Step Process app that can be installed into your account.
In this article
- Read-Only (Fields)
- Page1 - Read-only for Step2
- Page2 - Read-only for Step3
- Visibility (Pages)
- Page1 - Not Visible for Step3
- Run Conditions (Form Connectors)
- Email Connector - Step3 Complete
- Email Connector - Step2 Result = Rejected
- Tip 'n Tricks
- Page 1 - Submit button only visible for User 1
- Page 1 - Proceed button is only visible for User 2
- Page 2 - Submit button only visible for User 2
- Page 2 - Proceed button only visible for User 3
Note
Field values captured via calculations in a previous step do not re-evaluate in steps following it.
This is by design to maintain the initial data captured for reviews or when multiple users are completing their process, previous step captured data is unaltered.
However, if a scenario requires recalculating prior step field values. A workaround will be to make use of an Action Field's button(s) to act as a trigger when pressed to recalculate field values.
Read-Only (Fields)
Depending on your step in the process, you can make fields read-only, preventing previously captured data from being edited depending on another user's role in the workflow. In this case, the initial reviewer is unable to edit submitted data.
The following two examples demonstrate:
- User 1's captured data is uneditable by User 2.
- User 2's captured data is uneditable by User 3.
Page1 - Read-only for Step2
Within the Read-Only property on fields on Page 1 (Step 0/1), a formula that checks what current step the workflow is in can achieve this.
Formula:
(keep in mind that there are often multiple different formula variations that can achieve the same result)
Page2 - Read-only for Step3
For this scenario, we will enforce the constraint that when the workflow reaches User 3, this user should not be able to edit any fields on Page 2 (where User 2 would've submitted from).
Formula:
Visibility (Pages)
Applying visibility logic to different fields and pages can make the workflow process more streamlined and simplified, as users who don't need to see various pieces of information can have that information hidden from their view depending on what step a user is on in the workflow.
Page1 - Not Visible for Step3
For this visibility rule, which will hide Page 1 from the user in Step 3, we apply the visibility rule to the page by clicking on the page in the designer view to bring up its properties as shown below:
Formula:
Run Conditions (Form Connectors)
A workflow's current Step will be considered complete as soon as the app user uploads the Form entry. As such, the current Step will always be complete BEFORE connectors run. Any connectors you want to run on specific Steps should have a "run condition" added. You do this via the "Add Run Condition" option on most Form connectors. We recommend using STEP-COMPLETED() in your condition formula to accurately control when a form connector fires and on which step.
Email Connector - Step3 Complete
This run condition formula demonstrates how to send an email once Step3 has been completed with the status "Accept".
Formula:
Email Connector - Step2 Result = Rejected
The run condition below will ensure the email connector only runs when Step2 has been completed and the process status is "Reject".
Formula:
Tip 'n Tricks
Below are some easter-eggs we hid in the example app (2-Step Workflow), which demonstrate how to use formulas to have more granular control over what items are visible or read-only as a work item moves through a workflow.
As with many aspects of our platform, there are multiple different ways in which the same result could be achieved. These are just some proven formulas for process flows you build.
Page 1 - Submit button only visible for User 1
With this formula on the Visibility property of the Submit button, you will be able to ensure that the user, on the first step of the workflow, will be the only user who will be able to see the Upload button. When a workflow starts, the process step will have a blank value and a value of the process step name once an action has been performed on the process step button. This formula checks whether the field returns a blank value or the name of the first process step it will apply.
Formula:
Page 1 - Proceed button is only visible for User 2
When User 1 has submitted, and the workflow moves to processStep2, the formula above, applied to an action button providing form navigation, will ensure that only users in processStep2 will be able to view and interact with the action button.
Formula:
When the workflow has moved from processStep1 to processStep2, the formula above, when applied to the Submit button, will ensure that the button is only visible to User 2 in the process workflow.
Formula:
When applied to the Proceed button visibility property on processStep2, the formula will ensure that only the user on processStep3 can view the button.
Formula: