0

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.

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

1 Answer 1

1

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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