Skip to main content
Question

Using the IN operator in a TESTER

  • November 21, 2013
  • 2 replies
  • 109 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.

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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings