Skip to main content
Solved

AttributeValidator not finding words

  • October 31, 2017
  • 10 replies
  • 32 views

Forum|alt.badge.img

Im using the AttributeValidator to test words appears in my .csv file. It finds the following no problem - raised defence (man-made), but it keeps failing for the following - sea defence (man-made), even thought it appears in the list to test for. I have checked spelling and made sure there are not any extra spaces but it doesnt seem to recognize the word in the .csv file. Has anyone else had a similar problem?

 

Best answer by david_r

Try double-quoting all the list elements:

"coastal","defence","sea defence (man-made)","raised defence (man-made)","sea"
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.

10 replies

david_r
Celebrity
  • 8394 replies
  • October 31, 2017
Could you perhaps upload a minimal workspace that reproduces the issue? It would be very helpful.

Forum|alt.badge.img
  • Author
  • 8 replies
  • October 31, 2017

I tried but now both raised defence (man-made) and sea defence (man-made) fail :-s

av-example.fmw


david_r
Celebrity
  • 8394 replies
  • Best Answer
  • October 31, 2017

Try double-quoting all the list elements:

"coastal","defence","sea defence (man-made)","raised defence (man-made)","sea"

mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • October 31, 2017
Seems to be the - (dash) character that's the problem. I'll check with the developers and file a request to fix. In the meantime, as @david_r says, enclose the values in quotes in the AttributeValidator and all is OK.

 


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • October 31, 2017
Filed with developers. Reference: PR#80254

 

 


Forum|alt.badge.img
  • Author
  • 8 replies
  • October 31, 2017

Try double-quoting all the list elements:

"coastal","defence","sea defence (man-made)","raised defence (man-made)","sea"
It solved the problem in the test one and it is now working in my main dataset thank you. However, it's now failing to recognize - flood_gate, i've tried it with and without " "

 

 


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • October 31, 2017
It solved the problem in the test one and it is now working in my main dataset thank you. However, it's now failing to recognize - flood_gate, i've tried it with and without " "

 

 

I think you'll need to provide another workspace with an example of that. When I try it, it works for me.

 

 


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • October 31, 2017
Our developer says she will try and fit a fix into FME2018. So, no guarantees, but it will hopefully be fixed very shortly.

 


Forum|alt.badge.img
  • Author
  • 8 replies
  • October 31, 2017
Ok thank you

 

 


takashi
Celebrity
  • 7843 replies
  • November 1, 2017

Try double-quoting all the list elements:

"coastal","defence","sea defence (man-made)","raised defence (man-made)","sea"
I think this is a defect of the Help on the AttributeValidator.

 

Regarding the In operator, the help says "A list of values in which you are testing for a certain value. The Right Value is a comma-delimited list of values, or a range". However, there is no description about how you can set a "range" by the In operator and how you can test strings that contain a hyphen with the In operator.

 

In the Help on the Tester, there is this description.

 

"String ranges (i.e. a-d) can also be specified. If you want to test for values that contain a hyphen, those values should be enclosed in quotation marks. For example, if x=LL-27, then x In "LL-27","LL-83" would be true. On the other hand, x In LL-27,LL-83 would be false. This is because LL-27 and LL-83 are treated as two empty string ranges, since numbers are ordered earlier than letters when considered as strings."

 

I think the same description should be added to the Help on the AttributeValidator.