Skip to main content
13-Aquamarine
June 5, 2023
Solved

What is the main difference between validator and Expression.

  • June 5, 2023
  • 2 replies
  • 1351 views

Difference between Validator and Expression in Thingworx

 

Best answer by DanZ

The most obvious is that the validator only offers a Boolean output*, whilst the expression can return nearly any data type that Thingworx has to offer. A validator also provides additional event outputs for a True or False result.

 

*However, you can have other data types than Boolean returned, e.g. by using "Output = "Hi there". This (unfortunately) overwrites the implicit boolean output.

2 replies

DanZ15-MoonstoneAnswer
15-Moonstone
June 6, 2023

The most obvious is that the validator only offers a Boolean output*, whilst the expression can return nearly any data type that Thingworx has to offer. A validator also provides additional event outputs for a True or False result.

 

*However, you can have other data types than Boolean returned, e.g. by using "Output = "Hi there". This (unfortunately) overwrites the implicit boolean output.