You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/topics/Search.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,23 @@ A more complex form, useable through the [`FeatureSearch`](../references/qwc2_pl
230
230
}
231
231
```
232
232
233
-
Here, each field will provide a value which is substituted in the expression. Any [HTML Input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) type is supported (i.e. `text`, `number`, `range`, ...), with options depending on the input type. In addition, the `select` field type is supported to display a ComboBox, with the entries provided as `options` as in the example above. It is also possible to pass a flat list as `options`, i.e. `["Female", "Male"]` if the value is equal to the label.
233
+
Here, each field will provide a value which is substituted in the expression. Any [HTML Input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) type is supported (i.e. `text`, `number`, `range`, ...), with options depending on the input type.
234
+
235
+
In addition, the `select` field type is supported to display a ComboBox. You can specify the options:
236
+
237
+
* As a `[{"value": "<value>", "label": "<label>"}, ...]` value-label list.
238
+
* As a flat `["<value1>", "<value2>", ...]` list, in which case value and label are equal.
239
+
* By specifying a dynamic lookup URL as `options_query` instead of `options`, as follows:
240
+
241
+
* You can query the options via `qwc-data-service` by setting `options_query` to `<data_service_url>/<dataset>/keyvals?key=<key_field>&value=<value_field>`.
242
+
* In addition, you can pass a filter to dynamically query the key-values depending on the value of another field by specifying `filter`, i.e. `<data_service_url>/<dataset>/keyvals?key=<key_field>&value=<value_field>&filter=[["<field>","=","$FIELDNAME$"]]`, where `$FIELDNAME$` will be replaced by the currently selected value for field `FIELDNAME`.
243
+
* Alternatively, you can also query any service (including the `qwc-data-service`, or a WFS/OAPIF service) which returns a GeoJSON Feature Collection by specifying `options_query`, `value_field` and `label_field`, in which case the options will be populated with the unique sets of `{"<value_field>": "<label_field>"`} extracted from the returned GeoJSON features. For example:
*Note*: `qgis` provider searches are exposed to the search field only if no `fields` are specified (i.e. single input search). The `FeatureSearch` plugin on the other hand will list all `qgis` provider searches.
0 commit comments