Query widget tags

This page describes an older version, please read about the latest version at:
http://resources.arcgis.com/en/help/flex-viewer/concepts/

Configuration file for the Query widget

The general structure of the the Query widget configuration file is shown by the conceptual graphic below.

Conceptual overview of configuration options for Query widget

The file is defined by a <configuration> tag that identifies it as a configuration file for the Viewer. It supports setting the layer to query, defining the query, and the attribute fields of the returned features from the query. It has the following child tags:

<layer>
URL address to the layer that the query will be executed on. This is an individual layer within a service, so would normally end with a number, like .../MapServer/0.
<useproxy>
If true, will use the proxy specified in the main configuration file. Useful if the URL specified above is on a different server and does not have a crossdomain.xml file (or if the file exist but doesn't allow you access).
<query>
Query used by the widget (default is 1=1, which means all features). Another example is <query>ADDRESS like '%AVE'</query> which would return all features whose address field ends in AVE.
<fields>
Container for the retrieved fields. It has the following attribute and one child tag:
  • all - Determines the fields returned. Boolean value, where true returns all fields (default is false).
<field>
Specific field to be retrieved. It has the following attributes:
  • name - Name of the attribute field on the server side.
  • alias - Alias name to display on the client side. If this is not specified, the server alias name will be used and displayed in the widget.
  • dateformat - Format in which the date is displayed. Default is a full date and time in the users locale using date.toLocaleString(). Example date formats include YYYYMMDD, MMMM, YYYY, J:NN:SS, EEEE, MMM. D, YYYY at L:NN:QQQ A - see DateFormatter documentation for full description.
<titlefield>
Main field to display for query results (if not specified, uses displayFieldName attribute of the <layer>).
<filterfield>
The attribute field used to filter returned results. It has the following child tags:
<name>
Name of the attribute field on the server side.
<alias>
Alias name to display on the client side. If this is not specified, the server alias name will be used and displayed in the widget.
<linkfield>
Refers to a field that contains URL values. If the URL link has an extension .JPG, .PNG or .GIF, then the image is displayed, otherwise a clickable link is displayed. When the link is clicked a new tab opens to display content that is referenced by the link.
<refreshrate>
Time in seconds before re-requesting for updated features.
<zoomscale>
Scale to zoom to when item is clicked in the widget results. Default is 50000 (i.e. zoom to 1:50,000).

In addition, the configuration file also supports changing the labels and symbols used in the widget dialog (this is not shown in the conceptual graphic).

Labels

<labels>
Container for labels that can be modified in this widget. It has several child tags:
<loadinglabel>
Label for status window as the query is being executed (default for English is Loading...).
<filterbuttonlabel>
Label for the filter button (default for English is Filter).
<clearbuttonlabel>
Label for the clear button (default for English is Clear).
<filterresults>
Tooltip label for the first titlebar button (default for English is Filter results).
<filterclear>
Tooltip label for the second titlebar button (default for English is Show all).
<noresultlabel>
Label when query returns no features (default for English is No features found.).

Symbols

<symbols>
Property for custom symbols in the widget. Specifically, the symbol that is shown for each returned result. It has several child tags:
<picturemarkersymbol>
Defines a picture marker symbol. It has the following attributes:
  • url - URL or path to the picture marker symbol location (default is widget icon).
  • height - Symbol height (in pixels - default is 30)
  • width - Symbol width (in pixels - default is 30).
  • xoffset - Symbol offset along the x-axis (in pixels - default is 0).
  • yoffset- Symbol offset along the y-axis (in pixels - default is 0).
<simplelinesymbol>
Defines a simple line symbol. It has the following attributes:
  • color - Symbol color; values are based on RGB in hexadecimal format (default is Red - 0xFF0000).
  • alpha - Symbol transparency level. Values range from 0.0 (transparent) to 1.0 (opaque); (default is 0.8).
  • width - Symbol width (in pixels - default is 2).
<simplefillsymbol>
Defines a simple fill symbol. It has the following attributes:
  • color - Symbol color; color values are based on RGB in hexadecimal format (default is Red - 0xFF0000).
  • alpha - Symbol transparency level. Values range from 0.0 (transparent) to 1.0 (opaque); (default is 0.5).
<outline>
Provides an outline for the symbol. It has the following attributes:
  • color - Outline color; color values are based on RGB in hexadecimal format (default is Red - 0xFF0000).
  • alpha - Outline transparency level. Values range from 0.0 (transparent) to 1.0 (opaque); (default is 0.8)
  • width - Outline width (in pixels - default is 2).

Test drive the Query widget.

2/15/2012