Workflow action buttons are the way a reviewer can tell an app what they would like to do to the record they are reviewing.
Action Buttons Overview
Generally, action buttons are used to move the record along in the workflow. For example, at the Manager Review stage there might be ‘Approve’, ‘Reject’ and ‘Return to Submitter’ action buttons, and hitting ‘Approve’ might move the record to the VP Review stage.
Workflow action buttons are associated with a specific workflow stage. You must define your Workflow Stage before you can add any workflow action buttons to it. For details on creating and managing Workflow Stages, read the following article > Workflow: 1 – Stages
Workflow action buttons are created and managed from the Workflow tab on the forms design. To access the workflow action buttons of a form: Edit App > Builder > Forms (1) > Click Edit on the desired form’s tile (2) > Click on the Workflow tab.
|Edit App > Click on the desired form’s tile (1) > Click on the Workflow option (2)|
|Click on the desired workflow stage (3)|
Creating New Workflow Action Buttons
A workflow stage can have as many action buttons as required. Typical actions might be: Approve, Reject or Request Finance Review.
To create an action button, select the desired stage from the list on the left side of the screen (4), and then click on:
|Create Button Dialog|
|Button Name||Enter the name of the new action button.|
|Click to close the dialog and cancel the new stage creation.|
|Click to close the dialog, create the new stage, and be taken back to the Workflows tab.|
Defining Actions for Action Buttons
You will now see your new action button on the right side of the screen. To configure the button to take the desired action(s), click on it to show the drop-down configuration menu.
|Defining Button Actions|
There are two classes of actions: Default Actions and Conditional Actions.
These actions will run when the action button is clicked, unless there is a conditional action that matches the current situation, in which case that action will run. There can be multiple default actions, such as moving the record to the next workflow stage and also sending a notification email.
These actions have a logical test associated with them, such as “Department field contains Sales” or “Total Value field is greater than 10,000”. If this test is true, the the associated conditional action will run instead of the default action. There can be multiple conditional actions, and each can have more than one condition it must meet.
There are 5 types of actions:
|Change Stage||Move the record to a new workflow stage and set the workflow status accordingly, e.g. Draft to Manager’s Approval or VP Approval to Rejected.
Note: Once Change Stage has been selected once, it will no longer appear in the Type selector for that set of actions. This is because you can only change status to one other value, so there is no purpose for having multiple Change Stage actions.
|Send Email||Allows you to select or create an email template so that an email message is sent to interested parties when the workflow action button is pressed.|
|Generate PDF||Allows you to select or create a PDF template so that a PDF document is generated and downloaded to the users download folder, when the workflow action button is pressed.|
|Redirect||Allows you to select what should be seen by the user after the action button is pressed, e.g. go back to the prior view or open a specific form.|
|Assign User to Role||Allows you to set the value of a dynamic role, e.g. setting the Approving Manager role to have the value of the Manager field on the current record. Dynamic roles allow you to assign specific people to have a role specifically for this record, so Approving Manager could have a different name value for different records. (Traditional managed roles always have the same value for any record, as they are defined at the application design level.)|
|App Notification||Allows you to select or create an app notification template so that an in-app notification message is sent to interested parties when the workflow action button is pressed. (This creates an ‘App Notification’ type of action that can then be seen in the list of Actions.)|
|Create Record||Allows you to create a new record, in the current app or any other GW Apps app, based on information from the current record and additional entered values. (This creates an ‘Create Record’ type of action that can then be seen in the list of Actions.)|
|Update Record||Allows you to update an existing record, in the current app or any other GW Apps app, based on information from the current record and additional entered values. (This creates an ‘Update Record’ type of action that can then be seen in the list of Actions.)|
|Data Source Sync||Allows you to select or create an email template so that an email message is sent to interested parties when the workflow action button is pressed. (This creates an ‘Data Source Sync’ type of action that can then be seen in the list of Actions.)|
|Webhook||Allows you to select or create an email template so that an email message is sent to interested parties when the workflow action button is pressed. (This creates an ‘Webhook’ type of action that can then be seen in the list of Actions.)|
Change Stage Settings
|Next Stage||If you select ‘Change Stage’ as the type you will see the ‘Next Stage’ field. Select the desired stage records should move to when this button is clicked.|
Send Email Settings
|Select Email Template||If you select ‘Send Email’ as the type you will see the ‘Select Email Template’ button. Details for working with email templates to create customized notification messages are shown here: Email Templates.|
|Redirect To||Select between the following options:
|Options||Select the desired Form, Page or View name from the supplied list.|
Assign User to Role Settings
|Dynamic Roles||Select the name of a dynamic role to assign a value to from the list of dynamic roles in the application.|
|Fields||Select the name of the field to get the value from. Only Directory Lookup fields display in the list. If the list is blank, then you do not have a Directory Lookup field on this form yet, so go back to the design tab and add one before completing the workflow action setup.|
|Defining Conditional Actions|
|Conditional Action number and name||The conditional actions are automatically numbered 1, 2, etc. Next to the number is a name, which defaults to “Condition x” where “x” is the current number. You can change the name, though the name does not display to the end user and has no functional effect, it can be used as a description to help identify what the conditional action is for.|
|Field||Select the desired field.|
|Operator||The available comparison operators depend on the type of field selected:Text fields: blank, not blank, equals, not equals, like, not like, contains, does not contain.
Number fields: greater than, less than, less than or equal to, greater than or equal to, equals, not equals.
Date fields: before, after, equals.
|Comparison Value||If blank or not blank are selected then the condition is complete. If another operator is selected then a comparison value is required. The comparison value field matches the field selected, so it is a number field if the Field was a number, and if Field was a pick from list (radio button, etc) the comparison field will be a list selector with the the same list of values.|
|Adds an Action to the end of the actions list. Details for the Actions are identical as those in the Default Actions.|
Action Buttons Demonstration Video
The following video outlines creating stages and workflow action buttons:
|Below are links to articles that cover the other main areas of creating a workflow:|
|Below are the links to the episodes of Building an Expense Reports App tutorial series that include descriptions of setting up a workflow:|
|Part 5 – Expense Reports App – Workflow|
|Part 6 – Expense Reports App – Security|