This article discusses the role of square brackets in Actions. Square brackets are used to store information that can be called on later in a Workflow.
To ensure that square brackets are clearly understood, we recommend that readers follow along with the sections where the article discusses creating square brackets, using them in an Action, and running the Workflow we created on the User Application.
Table of Contents
- What are Square Brackets?
- Naming a Square Bracket
- Creating a Square Bracket to Store Data
- Using a Square Bracket in an Action
- How Square Brackets Look Like in a Workflow
- Managing Square Brackets Used in a Workflow
- Viewing a List of Square Brackets Used in an Action
- Renaming a Square Bracket
- Deleting a Square Bracket
- Related Articles
To fully understand this article, we recommended reading the following articles first:
What are Square Brackets?
Square brackets are used to store information that can be used later in a workflow. The information stored in them may be set up as a default value in a Start action, come from a user in a Form Action, received through a Get Data Action, or created as part of a workflow. For example, the result of a calculation can be stored in a square bracket.
In a Start action, square brackets are used to 1) store default values that greet the user when they start working through the workflow; and 2) pass data coming from another workflow. For more information, see Start Action.
Square brackets can be used across multiple Actions, allowing users to retrieve the information stored in them. They can also be used to build intelligent conditions into a workflow, allowing the workflow to progress differently depending on a square bracket input. Current system information such as the time, date, and information about the user is also stored in square brackets.
Naming a Square Bracket
Square brackets follow the format [square_bracket], thus their name.
When creating a square bracket, you have to give it a Name without any spaces within - it is recommended to use the underscore character ( _ ) to separate words in Square Bracket names. For example, employee_name.
The [ ] symbols are not used when naming a Square Bracket. The [ ] symbols are only used when you need to get the information contained within the Square Bracket and display it somewhere in your workflows.
Creating a Square Bracket to Store Data
In this section, we will create a Form action with two (2) square brackets, namely:
We will then use these square brackets in the workflow.
To create the square brackets:
- Create a Workflow (see Creating a Workflow for more information) and name it Welcome Email.
- After setting up the Start action, add a Form action to the workflow.
- Position your cursor over the Form action, then click Edit.
- On the Action Editor, click the Add button on the top-right and select a Text question type.
- On the Question box, type Enter your name.
- Check the Compulsory question box, then on the Give a name for the answer box, enter employee_name. This is our 1st square bracket.
- Optionally, enter a description and check the Long text question box to display a larger box on the field. You may also the Advanced Options button to display other configuration options for the question.
- Click Done to save your changes.
- Let's now add the 2nd square bracket. On the Action Editor, click Add, then select the Email question type.
- On the Question box, type Employee's email address.
- Check the Compulsory question box, then on the Give a name for the answer box, enter email_address. This will be our 2nd square bracket.
NOTE: Make sure to use a working email address if you want to test the workflow later following the instructions in How Square Brackets Look Like in a Workflow.
- Optionally, enter a description and check the Long text question box to display a larger box on the field. You may also the Advanced Options button to display other configuration options for the field.
- Click Done to save your changes, then click X to save the Form and close the Action Editor.
Do not publish the Workflow yet since we will add need to add another Action to it. This will allow us to demonstrate how to use the square brackets that we created above.
Using a Square Bracket in an Action
Once a Square Bracket is created and information is stored in it, you can use it in an Action.
In the example below, we will use the employee_name and employee_email square brackets we created in the previous section to gather information from our users.
To use the square brackets we created above in an Action:
- Add an Email action to the Workflow we created in Creating a Square Bracket to Store Data.
- Connect the Form action to the Email action.
- Click Edit to configure the Email action.
- On the Action Editor, under the To box, enter [email_address].
NOTE: Since you added email_address previously to the Form action that you connected to the Email action, this becomes available for use within the Form action.
In addition, when you start typing the opening bracket, [ , in the To box, if you have other square brackets aside from the ones you created earlier, you should see them appear in a list even before you complete entering the square bracket name. This can be seen in the above screenshot.
- Enter Welcome Email as the email subject.
- Under the Email text box, enter the following text:
Welcome to the company!
- Click Done to save your changes, then click X to save the Action and close the Editor. The screenshot below shows the completed Email action.
NOTE: You can use Square Brackets in fields marked with [ ] to the right. For example, in the above screenshot, square brackets can also be used in the cc, bcc, and Subject fields.
- With our Workflow design completed, we can now publish the workflow. For more information, see To Publish a Workflow.
NOTE: To see how the email will look like, you can also add a Page action to the Workflow before the Email action. For this Page action, you can use the same text used in the Email action. The employee name and email address corresponding to the employee_name and employee_email square brackets will be displayed on this Page action (sort of like an Email Preview) prior to sending the email.
What do Square Brackets look like in a Workflow?
Let's now run the Workflow on the User Application.
- On the Workflow Editor, click Address, then click the URL for the Workflow to open the User Application in a separate browser window.
- On the User Application, you will be asked to enter the employee name and email address (these correspond to the employee_name and employee_email square brackets we created above). Follow the prompts until the Workflow is completed.
- Check your mailbox for the email addressed to the employee you entered in Step 2.
Managing Square Brackets Used in a Workflow
As a workflow becomes more complex, it may become difficult to keep track of the square brackets used in the workflow. It may even happen that a workflow may have orphaned square brackets, or square brackets that are not used any more anywhere in the workflow.
To manage a workflow's square brackets, go to the [Square_brackets] tab on the Workflow Editor.
The number of errors directly related to square brackets used in the workflow is enclosed in parentheses to the right of the tab. In the screenshot below, 0 is enclosed in parentheses, meaning that there are no errors in the square brackets used in the workflow.
Here, you can see a list of the square brackets in your workflow, along with the following info about each square bracket:
- Data type, e.g. Text, Number, Number List, Text List, and Table, among others
- Origin action, or the name of the Action where the square bracket is found
- The origin action's type, e.g. Form, Get Data, and Date Calculator
- Action use, or the actions that use the data saved into the [square bracket]
Use the Search box on the upper right of the [Square_Bracket] tab to filter the list of square brackets using any of the above information.
If there are unused [square brackets] in a workflow, these appear in a separate table for easy identification.
Viewing a List of Square Brackets Used in an Action
Aside from the list of [square brackets] used in the workflow, a list of square brackets used in an Action are also available from within the Action.
To view the list of [square brackets] used in an Action, click theicon on the top right of the Action Editor, then Square Brackets.
Renaming a Square Bracket
When you rename a square bracket, AUTTO automatically changes the old square bracket name to the new name in all Actions where the square bracket is used.
Deleting a Square Bracket
When a process changes, a workflow's logic may change as well. When this happens, you may find that you either:
- No longer need a square bracket, in which case you can delete it; or
- Need it somewhere else in the workflow, in which case you can delete the square bracket from where it is currently located and recreate it in another Action in your workflow.
Regardless of which of the above options you choose, you will see a warning that deleting a square bracket may affect the workflow prior to the system performing the actual operation.
After deletion, you may check the [Square_brackets] tab on the Workflow Editor to see a list of the Actions that might have been affected by the change. For more information, see Managing Square Brackets Used in a Workflow.
To facilitate easy cleanup after the change, everywhere the deleted square bracket was used previously in the workflow will show [deleted_square_bracket].