Skip to main content

Hi All,

I seem to not be able to get the Tester to work using the in operator when trying to use Sting values.

I am trying to turn the ArcGIS definition query expression Workpack IN ("WDS - SP1", "WDS - SP2", "WDS - SP3") into the right syntax to place into the Tester.

Having the () on either side gave me nothing, I had some luck with the right value being "WDS - SP1", "WDS - SP2", "WDS - SP3", however this only returned values for WDS - SP1.

 

Cheers

Matt

HI @mgerbz,

Try : WDS - SP1,WDS - SP2,WDS - SP3


Hi @mgerbz

 

It works when you don't use the quotes around the test-values:


Hi @mgerbz

 

It works when you don't use the quotes around the test-values:

hmm, I'm afraid that it may not work. You need to remove the excess whitespaces following to the commas, but I think the double quotations would be necessary in the question case, since the test-value contains a hyphen which is a special character used to specify a range of value in the In operator use.

 

"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." -- Help on the Tester

 


HI @mgerbz,

Try : WDS - SP1,WDS - SP2,WDS - SP3

Yes, the excess whitespaces should be removed, but the double quotations have to be left in this case.

 

"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." -- Help on the Tester

 


Yes, the excess whitespaces should be removed, but the double quotations have to be left in this case.

 

"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." -- Help on the Tester

 

Ha missed that on the hyphens, good catch @takashi !

 


Thanks @takashi it was exactly as you said it. I had to keep the double quotation makes, AND remove all white space outside of the quotation marks (aka, only the comma should exist)


Reply