Assigns value to the variable or collection variable stored within the workflow context in order to minimize frequent updates to the database. The variables that are created by the user or the collection variables fetched via the Get Records activity are considered for this assignment.

Values assigned through this activity will not be updated in the database. To update values, use the Update Records activity with the option “Use the IDs and all field values from a record or record collection".

Prerequisite: A variable or collection variable must exist.

Use Cases:

  1. Assign Value to a collection variable: You need to set the Approval Required field to "true" for all contracts with a total value greater than USD 10,000.
    To achieve this, first use the Get Records activity to retrieve the relevant contracts. Next, implement a Loop activity to go through each retrieved contract. Inside the loop, use the Assignment activity to set the Approval Required field to true without updating the database for each record. After the loop, add an Update activity in the Done outcome, selecting the option to "Use the IDs and all field values from a record or record collection" to perform a batch update.

  2. Assign value to a variable when workflow is executing: Assign a value to the variable Approval_Required_Variable based on the record type during workflow execution.
    First, define the variable in the workflow. Then, add an If activity with the condition: if the record type of the current record is "MSA," you require approval; otherwise, you do not. The If activity will yield either a true or false outcome. If the record type is "MSA," the assignment activity sets the variable value to true. If it is not "MSA," the variable remains false. After the assignment activity, all subsequent activities will reference the updated value of the variable.

Properties, Entry Criteria and activity information

Properties represent the values used to perform the operations of an activity and Entry Criteria serve as conditions that determine whether an activity should be executed.

FieldDescription
Properties
Select Variable Type

You can assign a value to either a workflow variable or to the current item of collection variable inside a loop activity depending on the activity's placement.

Workflow Variable: Updates a workflow variable, preserving its value throughout execution. If the workflow is suspended, this value is saved in the database and retrieved upon resuming.

Workflow Variable Key Value

Enter the key name of the workflow variable you want to update, along with its value. This value will remain constant throughout the execution of the workflow. You can enter the value directly, use another variable, apply a formula, or select a static value from the resource dropdown (value field).

Current Item from Loop: Assigns a value to the current item within a loop. This option should only be selected if the activity is inside a loop.

Loop Collection Variable Name

Enter the name of the collection variable being used in the loop activity. This variable holds the set of items being iterated over.

Loop Current Item Variable Name

Enter the name of the variable that represents the current item within the loop. This variable will hold the value of the item being processed at each iteration.

Loop Variable Key Value

Enter the field name of the object that the loop iterates over. In the corresponding value textbox, assign the value you want for that field. You can use a variable or select a formula for the value.

Common
NameEnter the technical name of the activity.
Display NameThis field auto-populates but can be changed if needed.
DescriptionProvide a description that is relevant to the activity.