Skip to main content
Solved

Evaluate Boolean True or False using tester

  • February 6, 2019
  • 5 replies
  • 401 views

miquelrs
Contributor
Forum|alt.badge.img+7

Here's a basic one. Have a Boolean field and need to evaluate if it is T or F using a Tester transformer.

Have tried using "Field = F", "Field = False", "Field = 0" in the tester, but none of them seem to work.

This should be straightforward but I can't find it anywhere in the documentation.

 

Thanks in advance,

Best answer by david_r

It will depend on the input format. In my experience boolean fields are often represented as lower-case "true" or "false", but it can vary.

If you're completely stuck, consider connecting an Inspector on the reader (or create a breakpoint) and look at the data.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

david_r
Celebrity
  • Best Answer
  • February 6, 2019

It will depend on the input format. In my experience boolean fields are often represented as lower-case "true" or "false", but it can vary.

If you're completely stuck, consider connecting an Inspector on the reader (or create a breakpoint) and look at the data.


miquelrs
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 6, 2019

It will depend on the input format. In my experience boolean fields are often represented as lower-case "true" or "false", but it can vary.

If you're completely stuck, consider connecting an Inspector on the reader (or create a breakpoint) and look at the data.

Thanks david_r, I have already inspected the field and seems to be string "false", but using "false" in the tester doesn't work.


david_r
Celebrity
  • February 6, 2019

Thanks david_r, I have already inspected the field and seems to be string "false", but using "false" in the tester doesn't work.

Can you post a screenshot of your Tester configuration?


miquelrs
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 6, 2019

It will depend on the input format. In my experience boolean fields are often represented as lower-case "true" or "false", but it can vary.

If you're completely stuck, consider connecting an Inspector on the reader (or create a breakpoint) and look at the data.

It worked now using Filed = false. I needed to delete the output before running the script, otherwise it was just adding rows at the end of the existing file.

Thank you very much!


david_r
Celebrity
  • February 6, 2019

It worked now using Filed = false. I needed to delete the output before running the script, otherwise it was just adding rows at the end of the existing file.

Thank you very much!

Excellent!