Back in version 5.0 I had:

FILTER ("<tcode:expression/>" eq '[STATE][COUNTY]') 
final version = FILTER ("11000" eq '[STATE][COUNTY]')

so I would filter out the features with state = 11 and county = 000

Now, in 6.2, it does not work anymore. Does anyone know how to make it work with concatenated attributes?

I know that it would work like this:

FILTER ("11" eq '[STATE]' and "000" eq '[COUNTY]')

but it would really help me to find a way for the concatenation to work like:

FILTER ("11000" eq ('[STATE]'.'[COUNTY]')) -no error, but not display anything

Been browsing the documentation for a while but I just can't make this work.

  • Does it prompt any error if you do like this: FILTER ("11000" eq '[STATE][COUNTY]')? – mfdev Jul 10 '13 at 13:26
  • Hello, Yes, I get an error: Item &#39;STATE][COUNTY&#39; not found. – Robert Jul 10 '13 at 15:10

According to http://mapserver.org/mapfile/expressions.html#string-operations-that-return-a-string, “String1” + “String2’ returns “String1String2”.

  • Great answer! This works FILTER ("[ATTR_1]"+"[ATTR_2]"="Value1Value2") – user30184 May 20 '14 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.