Skip to main content
Solved

Trouble with Tester with in operator

  • February 12, 2021
  • 5 replies
  • 126 views

hugues
Contributor
Forum|alt.badge.img+2

Hi. I have a FGDB (esri) with coded value. I've tester for field (HorizontalAccuracy). This field must be in some value (Low, High, Medium).

I use in for operator but it doesn't work. I've try so with coded value. Can you help me please, I use FME 2018, i don't have cachedvalue :(in_operator

Best answer by tomf

hugues wrote:

I'v try this and it's dond't work !

 

I realise @Mark Stoakes​ has answered this, but for the sake of completeness in this answer the reason your IN clause was not working was due to the spaces after each comma.

FME is searching for values that match, e.g., " High (=<10cm)" and not "High (=<10cm)" (my quotes)

Removing those spaces will produce the right results.

View original
Did this help you find an answer to your question?

5 replies

Forum|alt.badge.img+2
  • February 12, 2021

@hugues​ You have to enclose values that contain a hyphen "-" in quotes - see user documentation on TestFilter Test Clause Operators. Hyphen is used as a range in the IN, i.e. 1-9 or a-z. So in your case you can use:

High (=<10cm),Low (>= 1m),"Medium (10cm - 1m)"


hugues
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 12, 2021
markatsafe wrote:

@hugues​ You have to enclose values that contain a hyphen "-" in quotes - see user documentation on TestFilter Test Clause Operators. Hyphen is used as a range in the IN, i.e. 1-9 or a-z. So in your case you can use:

High (=<10cm),Low (>= 1m),"Medium (10cm - 1m)"

In_operator_2


hugues
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 12, 2021
markatsafe wrote:

@hugues​ You have to enclose values that contain a hyphen "-" in quotes - see user documentation on TestFilter Test Clause Operators. Hyphen is used as a range in the IN, i.e. 1-9 or a-z. So in your case you can use:

High (=<10cm),Low (>= 1m),"Medium (10cm - 1m)"

I'v try this and it's dond't work !

 


Forum|alt.badge.img+2
  • February 12, 2021

@hugues​ I've attached an example workspace (FME 2020). Perhaps you can use that to reproduce the issue you've encountered.

workspaceAttributeValidator might also be an alternative as it gives you more granularity over the tests.


tomf
Contributor
Forum|alt.badge.img+14
  • Contributor
  • Best Answer
  • February 13, 2021
hugues wrote:

I'v try this and it's dond't work !

 

I realise @Mark Stoakes​ has answered this, but for the sake of completeness in this answer the reason your IN clause was not working was due to the spaces after each comma.

FME is searching for values that match, e.g., " High (=<10cm)" and not "High (=<10cm)" (my quotes)

Removing those spaces will produce the right results.


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