Official translation unavailable. Translate this page with Google:

Set Variable

This action assigns a new value to the selected variable.

Variables usually obtain their values using Use Data Filter action (available in Automation Builder) which extracts fields from the received data and maps them to variables. You might also need to set the variable values by yourself, usually for troubleshooting purposes. In Automation Builder, the variable values are not remembered between multiple triggers, but are kept while the same trigger is being processed.

Variable group defines the variable name and its value.

  • Name: name of variable that should store the value changed.

  • Value: value to be set to a variable. It can either be manually or dynamically defined using an existing or a newly created variable.

Save Variable Data

Product level info

Automation Builder features require NiceLabel LMS Enterprise or NiceLabel LMS Pro.

This action saves values of a single or multiple variables in an associated data file.

In NiceLabel Automation module, this action allows data exchange between triggers. To read the data back into the trigger, use action Load Variable Data.

Tip

The values are saved in a CSV file with the first line containing variable names. If the variables contain multi-line values, the newline characters (CR/LF) are encoded as \n\r.

Settings group defines the file name.

  • File name: data file to save the variable data to. If the name is hard-coded, values are saved into the same data file each time.

    Use UNC syntax for network resources. For more information, see section Access to Network Shared Resources in NiceLabel Automation user guide.

If file exists group offers additional options to save the values.

  • Overwrite the file: overwrites the existing data with new variable data. The old content is lost.

  • Append data to the file: appends the variable values to the existing data files.

File Structure group defines the CSV variable data file parameters:

  • Delimiter: specifies the delimiter type (tab, semicolon, comma or custom character). Delimiter is a character that separates the stored variable values.

  • Text qualifier: specifies the character that qualifies the stored content as text.

  • File encoding: specifies character encoding type to be used in the data file. Auto defines the encoding automatically. If required, the preferred encoding type can be selected from the drop-down list.

    Tip

    UTF-8 makes a good default selection.

  • Add names of variable in the first row: places the variable name in the first row of the file.

Variables group defines the variables whose value should be read from the data file. Values of the existing variables are overwritten with values from the file.

  • All variables: variable data of all variables from the data file is read.

  • Selected variables: variable data of listed variables is red from the data file.

Load Variable Data

Product level info

Automation Builder features require NiceLabel LMS Enterprise or NiceLabel LMS Pro.

This action loads values of a single or multiple variables from the associated data file as saved by the action Save Variable Data . Use this action to exchange the data between triggers. You can load a particular variable or all variables that are stored in the data file.

Settings group defines the file name.

  • File name: specifies the file for the variable data to be loaded from. If the name is hard-coded, the values are loaded from the same file each time.

    Use UNC syntax for network resources. For more information, see section Access to Network Shared Resources in NiceLabel Automation user guide.

File Structure group settings must reflect the structure of the saved file from the Save Variable Data action.

  • Delimiter: specifies delimiter type (tab, semicolon, comma or custom character). Delimiter is a character that separates the values.

  • Text qualifier: specifies the character that qualifies content as text.

  • File encoding: specifies the character encoding type used in the data file. Auto defines the encoding automatically. If needed, select the preferred encoding type from the drop-down list.

    Tip

    UTF-8 makes a good default selection.

Variables group defines the variables whose values should be loaded from the data file.

  • All variables: specifies all defined variables in the data file to be read.

  • Selected variables: specifies selection of individual variables to be read from the data file.

String Manipulation

This action defines how the values of selected variables should be formatted.

The most popular string manipulation actions are: delete leading and trailing spaces, search and replace characters, and delete opening and closing quotes.

This feature is often required is a trigger receives an unstructured data file or legacy data. in such cases, the data needs to be parsed using the Unstructured Data filter. String Manipulation action allows you to fine-tune the data value.

Note

If this action doesn't provide enough string manipulation power for a particular case, use Execute Script action instead to manipulate your data using Visual Basic Script or Python scripts.

UUID-e7689da1-7fbe-e698-af8e-884c627bf335.png

Variables group defines the variables whose values need to be formatted.

  • All variables: specifies all the defined variables in a data file to be formatted.

  • Selected variables: specifies a selection of variables to be formatted from the data file.

Format Text group defines string manipulation functions that apply to the selected variables or fields. Multiple functions can be used. The functions apply in the same order as seen in the editor – from top to bottom.

  • Delete spaces at the beginning: deletes all space characters (decimal ASCII code 32) from the beginning of the string.

  • Delete spaces at the end: deletes all space characters (decimal ASCII value 32) from the end of a string.

  • Delete opening closing characters: deletes the first occurrence of the selected opening and closing characters that is found in the string.

    Example 55. Example

    If using "{" as opening character and "}" as closing character, the input string {{selection}} is converted to {selection}.


  • Search and replace: executes standard search and replace function upon the provided values for find what and replace with. Regular expressions are supported.

Note

Several implementations of regular expressions are present. NiceLabel 10 uses .NET Framework syntax for the regular expressions. For more information, see the Knowledge Base article.

  • Replace non printable characters with space: replaces all control characters in the string with "space" character (decimal ASCII code 32). Non printable characters are characters with decimal ASCII values between 0–31 and 127–159.

  • Delete non printable characters: deletes all control characters in the string. Non printable characters are characters with decimal ASCII values between 0–31 and 127–159.

  • Decode special characters: decodes the characters (or control codes) that are not available on the keyboard, such as Carriage Return or Line Feed. NiceLabel 10 uses a notation to encode such characters in human-readable form, such as <CR> for Carriage Return and <LF> for Line Feed. This option converts special characters from NiceLabel syntax into actual binary characters.

    Example 56. Example

    When you receive the data "<CR><LF>", Designer uses it as plain string of 8 characters. You will have to enable this option to interpret and use the received data as two binary characters CR (Carriage Return – ASCII code 13) and LF (Line Feed – ASCII code 10).


  • Search and delete everything before: finds the provided string and deletes all characters in front of the defined string. The string can also be deleted.

  • Search and delete everything after: finds the provided string and deletes all characters behind the defined string. The string can also be deleted.

  • Change case: Changes all characters in your strings to uppercase or lowercase.