Exclude Text From Evaluations
Previous Topic  Next Topic 


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 can be used around the text that should be excluded.


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]'|}


Another example


|'[Focas.current_block]'| = M60