Skip to main content
Question

Using the IN operator in a TESTER

  • November 21, 2013
  • 2 replies
  • 236 views

moberdries
Contributor
Forum|alt.badge.img+7
Does the IN operator in the TESTER extend to working with string elements as well as numbers?  The FME help documentation shows a number example (below) but I would like to search a string element list:

 

 

Help example:

 

X=5, is X In 1,2,3 (no = FAIL)

 

 

Why can't I do this:

 

X=hello, is X In hello,goodbye (yes = PASS)

 

 

I am running FME2012 (SP0) if that is the limiting factor?

 

I have tried quoting the string elements?

 

I have tried a regex operator using the (hello|goodbye) syntax?

 

 

I have an attribute that I want to filter on 10 or so qualifying values - I could build a lengthy OR statement in TESTER but I was hoping for a simpler workaround.
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.

2 replies

moberdries
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 21, 2013
Hmm ... looks like one workaround is to use the StringSeracher with a regex that looks like this:

 

 

^(hello|goodbye)$

 

 

Still doesn't explain why "IN" in the TESTER does not work for me or why the same regex notation does not work with the TESTER?

 

 

Haven't had a chance to test this with a later FME build.

 

 

Mike

  • November 21, 2013
Hi Mike,

 

 

I use FME 2013 SP4 and the IN operator works well with your examples.

 

 

Thomas