How can we help?

Exclude Text From Evaluations

You are here:
< All Topics

Overview

When performing an evaluation with variables there are times when a variable may be populated with text that interferes with the expression engine. For example, a file path would contain a back slash which the expression engine would interpret as a divide symbol.

To handle these scenarios a variable can be ‘marked’ to notify the expression engine to treat the contents of the variable as a string and not to try and do an evaluation on the text inside the variable.

To mark the text a pipe and an apostrophe character combination can be used around the text that should be excluded as follows:

|'text goes here'|

For example, when using MTConnect some MTConnect Adapters provide the full file path for the Program data item. In this case the MTConnect program number variable in DataXchange will be populated with characters that would cause problems for the DataXchange evaluation engine. Wrapping the [MTC.program_number] variable in between the pipe apostrophe characters will allow the expression to work as intended.

[PCSDB.send_part_start] {|'[MTC.program_number]'|}

Here is another example working with a Focas system:

|'[Focas.current_block]'| = |'M60'|

The characters should mirror each other on both sides of the = to ensure the expression evaluates true.

Table of Contents