[Chameleon] Query Widget returns too much information.

Normand Savard nsavard at mapgears.com
Mon Aug 13 14:06:19 EDT 2007

LITTLE Nelson wrote:

>Hello Chameleons!
>I am using the Query Widget but I find that when I query an item the
>popup results windows displays values for every attribute for the
>item(s) queried. 
>In my map file I have defined the attributes that should be returned in
>the "RESULT_FIELDS" for the layer being queried. I would expect that the
>query widget only returned the values for the attributes defined in
>Can anyone offer any help?

To limit the number of attributes displayed you have two choices.  You 
can add the HEADER keyword in the proper layer section or your can use 
the RESULTFIELDSMETADATA Query widget attribute.

First with the HEADER keyword you have to write something like this in 
the map file:

 *To use with Map->Layer->Header
 * insert in the mapfile at the specified layer a header tag like
 * The seperators are '|' and '^'
 * '|' means: seperator between columns
 * '^' means: seperator between real column name and displayed column name
 *     if the displayed column name is empty then the column is not been 
shown (in the example ar only the columns 'Code' (UNIQUE_KEY) and 'Name' 
(NAME) shown -> 'displayed name' (real column name)

Secondly the RESULTFIELDSMETADATA attribute allows you to specify a 
metadata to look for in the mapfile.  The default metadata name is 
RESULT_FIELDS_LIMITED.  In the map file it will look something like:


Note:  The RESULTFIELDSMETADATA query widget attribute is in Chameleon 
cvs only.

The priority  in the way to limit the displayed attributes is like this:


More information about the Chameleon mailing list