Set value DAC
The Set value dynamic advanced command is part of the variable commands. Use this command to create a new variable and set its value or modify an existing variable's value within your wizard. Drag it into a wizard from the Advanced commands view in the Nintex Wizard Editor to use it.
Before you begin:
Learn how to navigate the Nintex Wizard Editor of the Studio.
Understand how to create wizards and use advanced commands.
Understand variables.
Learn how to customize error handling within an advanced command.
Understand how to configure wizard fallbacks.
Use the Set value command to enhance your automation in various scenarios:
-
Set up new variables to store data for use later in the workflow.
-
Set or update the value of an existing variable.
-
Create variables for special characters like space, tab, enter, and empty to manage text formatting and delimiters.
-
Combine static text and variable values to build dynamic strings, such as dates or formatted text.
-
Save results from calculations or operations within your automation.
-
Keep track of directory paths or increment counters during runtime.
Understanding the characteristics of variables is crucial when using the Set value command. Here are some key points:
-
Availability: By default, a variable is valid only during runtime for the wizard for which it was created. The variables of an embedded wizard and its containing wizard become available to each other during runtime.
-
Name:
-
The variable name is free, alphanumeric text.
-
It is not case-sensitive and can include spaces.
-
Variable names cannot include any special characters, such as ! @ # $ * % ^ & ( ) / < > - = | \, but underscores (_) are allowed.
-
-
Value:
-
Variables do not have to contain a value to be used in commands. An undefined variable will simply contain an empty string.
-
Variable values can be changed at any time.
-
The value of a variable is always treated by the wizard as a string, even if it represents a numeric value.
-
Values of sensitive variables (identified by the prefix _SENSITIVE_ added to the variable name) are not copied to the logs.
-
In the Nintex Wizard Editor, search for the Set value command and drag it into your steps. Use the table below to configure each field and understand the settings:
Field | Description | What to do |
---|---|---|
In the variable | The name of the variable you want to create or assign a new value. |
Enter the name of the variable. If the variable already exists, choose it from the drop-down list.
|
Set the value | The new value to assign to the specified variable. |
Enter the desired value.
|
Follow these best practices when using the Set value command:
-
Set initial values for variables at the start of the wizard, including special characters to handle delimiters and format text:
-
Create a variable named Space and set its value to <Space>.
-
Create a variable named Tab and set its value to <Tab>.
-
Create a variable named Enter and set its value to <Enter>.
-
Create a variable named Empty and set its value to <Nothing> (i.e., no character).
-
-
Use consistent naming conventions and update methods throughout your workflows to reduce confusion and errors.
-
Update variable values based on user input or retrieved data.
This example shows how to combine the month, day, and year to build a date string.
-
Add the Set value command to your wizard and complete the following fields:
-
In the variable: Enter separator.
-
Set the value: Enter /.
-
-
Add another Set value command and complete the following fields:
-
In the variable: Enter date.
-
Set the value: Enter 08$separator$10$separator$1967.
-
-
Use the View variable list command to verify the results.
The following video provides guided instructions on how to use the Set value command: