Split DAC
The Split dynamic advanced command is part of the variable commands. Use this command to divide the contents of a variable into two parts and place each part into a separate variable. This process is often called parsing. You can choose to split the variable at the occurrence of a specific character (called a delimiter) or at a specific character position within the variable. 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 Split command to enhance your automation in various scenarios:
-
Split a variable to get specific parts of a string. For example, if you only need the city name from an address variable.
-
Use a split variable in one section of your wizard and use parts of that variable in other sections. For example, split a product code with a region identifier to use the full code for inventory management and the region identifier for regional sales reports.
-
Split mixed data values like numbers or dates.
-
Use this command to extract specific details from a string, parse data from text files or user input, separate values for individual processing, or organize information from structured files like CSV or Excel files.
In the Nintex Wizard Editor, search for the Split command and drag it into your steps. Use the table below to configure each field and understand the settings:
Field | Description | What to do |
---|---|---|
Split variable
|
The name of the variable you want to split. | Enter the name of the variable. You can use an existing variable (e.g., $MyVar$) or create a new one. |
By characters
|
The method to use for splitting the variable by delimiter. |
Select By character and choose First occurrence or Last occurrence of a specific delimiter in your selected string, and enter the delimiter. You can include free text and/or values copied from different variables |
Match case
|
Option to match the case of the delimiter. This option is unchecked by default. Only relevant if the By characters method is selected. |
Check the Match case option if your delimiter's case sensitivity is important. |
By character position
|
The method to use for splitting the variable by characters position. |
Select By character position and choose a single variable or enter a numeric value representing the number of characters from the start or from the end of your selected string. Use the Find command to first locate the position of a specific value. |
Result variables
|
The names of the variables to store the two parts of the original variable. The variables split according to these rules, depending on your selection:
|
Enter the names of the two variables to store the resulting split data. You can use existing variables or create new ones. |
Remove blank spaces
|
Option to remove any blank spaces at the beginning and end of the split variables (e.g., <Space>, <Tab>, and <Enter>). This option is unchecked by default. | Specify if you want to remove leading and trailing blank spaces from the split results. |
Follow these best practices when using the Split command:
-
Ensure the delimiters or patterns in the input data are consistent and expected. For example, if you're splitting an address, verify that the comma or other delimiter is correctly placed to ensure accurate data splitting.
-
Understand the structure of your variables to ensure you split them correctly before performing splits.
-
Use the option to remove blank spaces to clean up the split results.
-
Use the Split command to create new variables to save parts you are not currently working on.
-
Test your split results with the View variable list command to ensure you get the sections you intended.
-
Be aware of character position behavior. When splitting based on a character position, the split occurs exactly at the specified position. For example, if your split position is 2 in the string "####", it will result in "##" and "##", not "# and ###". If you want to avoid cutting off a specific character, consider adjusting the position or modifying your split strategy to ensure the intended text is preserved.
-
Use it in combination with the Loop command. When using the Split command within a loop, it is often useful to split the original variable as follows:
-
Place one of the parts into a new variable.
-
Overwrite the 'pre-split' value of the original variable with the 'post-split' value.
-
Learn more about the Loop command here.
-
This example shows how to extract an employee's name from a CV text.
-
Add the Set value command to your wizard to store the CV text in a variable.
-
Add the Split command and complete the following fields:
-
Split: cv text
-
Select By characters.
-
Select First occurrence.
-
of the delimiter: ; (semicolon)
-
-
Into the variables: details and trash.
-
Select Remove blank spaces around results.
-
-
Add another Split command to further split the details variable and complete the following fields:
-
Split: details
-
Select By characters.
-
Select First occurrence.
-
of the delimiter: : (colon) to isolate the employee's name.
-
-
Into the variables: trash and employee.
-
Select Remove blank spaces around results.
-
-
Use the View variable list command to verify the split works as intended.
The following video provides guided instructions on how to use the Split command: