Dynamic Drop-down Filter Templates
A Dynamic Drop-down filter template is used in CartoPac Studio Solutions to crop data down to a mobile device based on the selected value of a queried drop-down control. Rather than static (unchanging) values appearing in a drop-down control when downloading a project, values in a dynamic drop-down control change based on the queried values within a database.
Complete the following steps to add a new Dynamic Drop-down filter template:
-
Open CartoPac Studio's Solution Explorer window and expand the Filter Template folder.
-
Click the Regular Expression Filter Template option.
-
Modify the properties:
Dynamic Drop-down Filter Template Properties
-
Filter Placeholder Name — the Placeholder name of the filter template is the variable name that will be used in the SQL Filter property of any feature or table's attribute properties in the Solution Explorer window. It is recommended to refrain from using spaces in variable names, as well as from naming the variable the same name as an attribute in the Solution.
-
Prompt— the Prompt text displays as a label above the control in the drop-down box at the time of download. The message is meant to direct the user to select a value to filter an attribute by.
-
Query Database —select an active database to query from the Query Database drop-down property. The Query Database value is the database that contains the feature or table to be queried.
-
Query Table — select an active feature or table to query from the Query Table drop-down property. The Query Table value is the feature or table that contains the attribute to be queried.
-
Table Filter — Optional. The Table Filter property functions similar to the SQL Filter property on an attribute in Studio's Solution Explorer pane. It functions as a Where Clause that allows queried values to be filtered down even further. Its most powerful function is to allow one queried drop-down filter template to filter values based on the selected value of another queried drop-down filter template. (For example: another variable name or Filter Placeholder Name may be entered in the Table Filter property to filter down queried results further. A state name might be selected from one filter template, and a county name Dynamic Drop-down filter template may only display counties within the selected state.)
-
Display Attribute — select an attribute to display from the Display Attribute property. The selected Display Attribute will appear visually as a list of values in a drop-down control on the download dialog box when downloading a project.
-
Store Attribute — select an attribute to store from the Store Attribute property. The selected Store Attribute value is the value that is actually passed into the variable for use when filtering data by a SQL filter's Where Clause at the time of download.
-