Home General Discussion

How to show a dropdown with Query Results ?

Stephane_BouillonStephane_Bouillon Customer Advanced IT Monkey ✭✭✭


When using the ROToolbox to create an autocomple field, is it possible to have a dropdown that shows all values ? What I mean is that, instead of typing a few letters of the desired value, the user interface shows a dropdown such as for a simple List, but with the values determined by the Query Results ?



  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    There's a QueryList control that lets you supply a a dashboard query as the source for a list. Here's the description from the code:

    @QueryList -----

    This tag replaces the data source of a Simple List prompt with a Dashboard query. This allows you to build a list from any data source which could be used as a source for the dashboards. The following properties are available:

    QueryId: (Required) This is the guid of the query saved on the Dashboard Query Settings page in the portal. The simplest way to find this value is to query the DataSource table in the ServiceManagement database.

    Sort: The name of the field used to sort the data. The data will be sorted in ascending order based on the value in this field.

    Default: The name of the field which contains a default flag. If one of the rows has a 1 in this field, that row will be used as the default. If this is not set, the code will look for a field called Default in the source. Item: The field containing the content displayed to the user. If not specified the first field in the source data will be used.

    Value: The field containing the value which will be submitted to the server.

    ItemTemplate: A template which is applied to the elements in the dropdown list. Note: if you need to include # symbols in the template which are not limiters for the data substitutions then they must be escaped with a double backslash \\

    ValueTemplate: A template which is applied to the selected item. This is simply for display on the form. It is not saved as the input value.

Sign In or Register to comment.