You can't use that syntax exactly. But what you want to do is possible. You'll have to set 2 parameters in the URL. You can use the dmmethod variable for the expression like you have below. For the classitem you'll have to use syntax like:
map.layer[layername]=CLASSITEM+'somevalue' You'll need to setup validation on both dmmethod and the classitem, should be the same regex in both cases. Steve -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Theobald, Charles Sent: Friday, July 24, 2015 1:53 PM To: [email protected] Subject: [mapserver-users] Using a variable as a CLASSITEM Is it still possible to use a variable for the value of CLASSITEM? We're passing the field name to be used in the CLASSes in the URL as a variable (%dmmethod%): CLASSITEM '%dmmethod%' FILTER ('[type]'='County') STATUS on CLASS NAME 'No Drought' EXPRESSION ('[%dmmethod%]'='-1') STYLE COLOR 255 255 255 OUTLINECOLOR 20 20 20 END END This used to work in previous versions. There are 6 different fields that could be searched, for 6 possible values. I'd really like to avoid creating 36 classes for each layer that uses this attribute table. I am including dmmethod in a validation block in each layer trying to use this variable. Mapserver version is 6.0.3 Any suggestions would be greatly appreciated. Thank you. Charles Theobald NC Division of Water Resources [email protected] 919-707-9136 *E-mail correspondence to and from this address may be subject to the North Carolina Public Records Law and may be disclosed to third parties. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
