Solved

AttributeValidator not finding words


Badge

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?

 

icon

Best answer by david_r 31 October 2017, 16:57

View original

10 replies

Userlevel 4
Could you perhaps upload a minimal workspace that reproduces the issue? It would be very helpful.
Badge

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

av-example.fmw

Userlevel 4

Try double-quoting all the list elements:

"coastal","defence","sea defence (man-made)","raised defence (man-made)","sea"
Userlevel 4
Badge +25
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.

 

Userlevel 4
Badge +25
Filed with developers. Reference: PR#80254

 

 

Badge

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 " "

 

 

Userlevel 4
Badge +25
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.

 

 

Userlevel 4
Badge +25
Our developer says she will try and fit a fix into FME2018. So, no guarantees, but it will hopefully be fixed very shortly.

 

Badge
Ok thank you

 

 

Userlevel 2
Badge +17

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.

Reply