Set Variable Enhancements:
Variable(s) cannot be saved in the flow (Set Variable action type) without a name. User receives a validation message on the screen.
Apostrophe can be included in the variable name successfully, system does not throw an error.
Set variable action type now has the option to select data types when a calculated field is used to define a variable. This helps to evaluate a flow step rule's conditions accurately.
Note: you can not change the data type of a variable when selected directly from the entity. Default data type of the field will show up in the action type when defined.
The user can see the field type of the variable
If a calculated field is used then the user can specify the output type in the variable action
When configuring a flow, Update Data action type does not allow us to update entity other than the launching entity defined at the beginning of the flow. To overcome this limitation, Flow offers an action type called Set Variables ,which allows us to use values from entities other than the launching entity.
In the following example we will be creating a flow which notifies employee of their cumulative travel days in year whenever a travel request is created in the system with the help of Set Variable action type.
For the system to send a notification whenever a travel request is created, launching entity for this flow needs to be Travel Destination.
Add a step this flow before adding action type.
To notify users of their cumulative days, first we need to calculate the cumulative days using the TaxThresholdActivityWarehouse entity (Set Variable action type) and then use the value in the notification action.
Adding Set Variable Action Type
After naming your step, click on the New Action button and select Set Variable action type from the drop-down.
User is taken to Set Variable action definition page and modal to select entity to create variable(s) pops up.
Select TaxThresholdActivityWarehouse entity from the modal and add fields required to calculate cumulative days.
Save this action and create a Notify action type to complete the flow.
Create Notify Action Type.
Click on the New Action and select Notify from the drop-down box. Enter a name for the action. You can either enter a specific email address or enter an expression to generate email address dynamically (2)
This action type uses the variable created in Set Variable action type to calculate cumulative days using another entity other than the launching entity (3).
Save your action and activate the flow.
Create a travel destination and save it in the system. This triggers the flow and user receives an notification on their cumulative travel days.
Note: Once an Action Type is created, it may not be deleted if it is used by other records.