This workflow uses a configurable schema to build a complex SQL conditional query. It allows an administrator to configure specific searches for their use cases, by tailoring SQL queries to their needs.
Requirements
- VertiGIS Studio Productivity Kit with active service subscription
- Activity Pack Deployment
The deployment of Activity Packs is described in this section.
Inputs
-
layer: string
The layer to be queried. Supported layer types include Feature Layers and Map
Image Layers, as well as standalone tables. You can specify the layer using one of the following
identifiers:layer-map-id: A unique identifier for the layer within the map. This is the recommended identifier, as it remains consistent across all Studio Web Apps using the same map. (Refer to the example below for guidance on locating this ID.
layer-extension-id: A unique identifier for the layer's extension within the app.
layer-title: The name or title of the layer.
-
sublayer: string | number (optional)
The sublayer to be queried. You can specify the sublayer using one of the following identifiers:
sublayer-id (string): A unique identifier for the Sublayer within the layer.
subtype-code (number): The subtype code for a SubtypeSublayer. If the layer is a SubtypeGroupLayer, use this identifier to specify the sublayer. (Refer to the example below for guidance on locating this ID).
-
queryTemplate: string (optional)
Template SQL query with tokens. Tokens are configured within each field and are replaced in the query with the user selection. Required if dynamicOrQuery is FALSE -
dynamicOrQuery: boolean (optional)
Allows for an automatically query to be created using any of the configured fields user's input. The query will be comprised of only "OR" clauses. -
formTitle: string
Title for the search form. -
formDescription: string
Description for the search form. -
fields: object array
An array of definitions for each field. The following properties are
included:-
token: string (optional)
Token that must be included in the queryTemplate to be replaced. Required if dynamicOrQuery is FALSE. -
id: string
Field name in the layer. -
title: string
Label for the field in the workflow. -
autoComplete: boolean
Indicates if it's an autocomplete (true) or a dropdown (false). -
minLength: boolean (optional)
The minimum length for user input to show AutoComplete suggestions. Default is 3. -
type: string | integer (optional)
Type of the field in the ArcGIS layer - Currently "string" and "integer" are supported. It is strongly recommended to set the type correctly. Especially if the values are being retrieved from a coded value collection and are from type integer. The values can be incorrectly evaluated in the SQL query, which results in an error and the query cannot be processed. Example intValue = '5' instead of intValue = 5. -
prefixText: string (optional)
If configured, displays text above the field. -
suffixText: string (optional)
If configured, displays text below the field.
-
Behaviour
- The search form will display all configured fields.
- The administrator should configure the formTitle and formDescription to instruct the user on the type of search and conditions of the search.
- By using prefixText and suffixText, the administrator can add more context and information for the queries, given the querie's complexity.
Configuration Example
Locating the URI in Web-App JSON
To find the URI for a layer or sublayer in the VertiGIS Studio Web-App JSON, refer to the following example of a layer-extension and sublayer-extension object. You can access the Web-App JSON via the VertiGIS Item Manager or in the Web-Designer Editor by pressing Ctrl+Shift+E.
Example: Layer-Extension Object
- id: Unique identifier for the layer-extension.
- sublayerExtensions: Array of references to sublayer-extension objects.
-
layer: Contains the reference to the layer, including its unique id and title.
-
id: This is the layer-map-id, a unique identifier for the layer within the map. It is the
recommended identifier as it remains consistent across all Studio Web Apps using the same
map. - title: The name or title of the layer.
-
id: This is the layer-map-id, a unique identifier for the layer within the map. It is the
-
layerType: Specifies the type of the layer. For example, it can be ArcGISFeatureLayer, ArcGISMapServiceLayer, SubtypeGroupLayer etc.
Example: Sublayer-Extension Object
- id: A unique identifier for the sublayer-extension. This ID should not be used to reference the sublayer. Instead, use the id provided within the sublayer object below.
-
sublayer: Contains the reference to the sublayer, including its unique id and title.
- id: This is the sublayer-code, a unique identifier for the sublayer within the layer. It is the recommended identifier as it remains consistent across all Studio Web Apps using the same map.
- title: The name or title of the sublayer.
- $sublayerType: Specifies the type of the sublayer. For example, it can be "ArcGISMapServiceSublayer", "SubtypeSublayer", etc
Comments
0 comments
Please sign in to leave a comment.