How does CAST_TO function works in vflow2.0?

How does CAST_TO function works in vflow2.0?

3 Likes

Take an element that should be invisible when the following condition evaluates to false:
CAST_TO(getVal(“tempObject.component_info_response.data[0].config.details.Data”), “boolean”) == false

  • The getVal(tempObject.Data) function retrieves the value from the path:

  • The CAST_TO(getVal(tempObject.Data), "boolean") function converts this retrieved value to a boolean.

  • If there is some value present at that path, the boolean cast will return true.

  • Since the condition checks for equality to false, a true value will not satisfy it.

  • Therefore, only when the data is missing or false, the cast will return false, making the overall expression false == false, which evaluates to true, and the element becomes invisible.

  • In short, the CAST_TO function converts the retrieved data to a boolean and checks .

5 Likes