Skip to main content
Solved

Trouble with Tester with in operator

  • February 12, 2021
  • 5 replies
  • 150 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

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.

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

Forum|alt.badge.img+2
  • 1891 replies
  • 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
  • 9 replies
  • 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)"

In_operator_2


hugues
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 9 replies
  • 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)"

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

 


Forum|alt.badge.img+2
  • 1891 replies
  • 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
Supporter
Forum|alt.badge.img+20
  • Supporter
  • 107 replies
  • Best Answer
  • February 13, 2021

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.