Skip to end of metadata
Go to start of metadata


The following is an example of a string replacement script developed to allow the passing of a FNC1() character in a .pas or .xml data file. This concept can be applied to other scenarios where character sequences in the data from the input file is not allowed.

How to use a label script to replace a string or character

The following procedure replaces a string or character with another string or character using a label script. This also allows passing of data that is normally not allowed in an .xml file format. 

  1. Set up a scripting field, input field, and a fixed field containing a formula with the replacement character ('FNC1 ()' as shown in the following example).
  2. Copy the sample script below into a text editor.
  3. Modify the sample script, using the names of the actual fields on your label.
  4. Copy the modified script into the scripting field data source window. 

For an example, refer to the attached sample label fnc1 replace.lwl.

Sample Script

Article Number



LLM and later


Any supported LPS Family product environment