Skip to content

Query#

queryIcon

Overview#

The Query widget displays the results of any Query - including Queries with Parameters. An example is shown below, where a Query widget is used in the bottom of the UI Page to show the results of a Query.

queryExample

General Steps#

To use the Query widget in a UI Page, follow the steps below:

  1. In any UI Page in Build mode, select the Query from the widgets list located on the left side of the page; drag and drop to the desired place in the UI Page.
  2. Enter the Settings section of the widget through the three vertical dots.
  3. In the General tab, provide a name and a description for the widget. Use the toggle buttons to specify whether the widget should be visible, display the header, or allow full screen mode. Additionally, determine if the widget can be opened as an image in a new tab or exported as an image. You can also select the navigation mode behavior: open a new page, replace the current page, or none.

queryGeneral

Widget Customization#

  1. Optionally, in the Style tab, you can define a Border Width and Color.

    Screenshot showing a widget customization interface with options for border width and color.

  2. In the Query Setup tab provide the following properties:

    • Query - The Query to display.
    • Selection mode:
      • Multiple - Multiple lines can be selected
      • None - No selection available when interacting with the displayed data
      • Single - A single line can be selected
    • Show Totals When Insufficient Space - Set to trueby default, this option indicated whether to display only the number of items if there's no sufficient space to display all columns.

    querySetup

  3. Optionally, define the Links between this widget and other elements of the UI Page.

    queryLinks

  4. Select Save and Close to complete the widget configuration.

Real Use Case#

In this example, we will add a Query widget using a parameterized Query and link it to a Form widget that allows you to provide the parameters.

Note

If the Query has entity parameters configured with syntax Is Equal, these parameters are mandatory for the query to execute. If name parameters are used with syntax Contains, the parameters can be optional.
If parameters are added or removed to a query after it has been added to the UI Page it needs to be removed and added again to make the changed parameters effective and available in linking. However, columns to be viewed can be changed at any time on the query and will take effect once the page is refreshed.

The way the link is built depends on the setup of the Query parameters. Below are some common examples.

Entity Parameter#

This examples uses an entity parameter as an input for your Query.

  1. Setup an entity parameter on the Query: For example, a Material entity for a Scheduled Scenario Job Query:

    Screenshot showing setup of an entity parameter in a scheduled scenario job query.

  2. Configure the UI Page: The query expects the entity ID, which can be based on an entity selection by using the Any To Any Property converter with the parameter set to Id. Create the converter parameter as a property in the UI Page settings.

    Screenshot showing a UI page with "Properties" and "Property Details" labels.

  3. Configure a Form widget. For more information, see Form.

    Screenshot showing an entity parameter configuration field in a form widget.

  4. Next, link the Form widget to the Query parameter:

    Screenshot showing a form widget linked to a query parameter with details labeled as "unkDetals".

  5. To conclude this scenario, you will also have to configure a converter for the previous link using the Any To Any Property:

    Screenshot showing an entity parameter with details including "Any To Any Property" and "MATERIA".

Name Parameter, from a single entity selection#

  1. Setup an entity parameter on the Query: For example, a Resource name for a Scheduled Scenario Job Query:

    Screenshot showing a query setup with a single entity selection parameter.

  2. Similarly to what was done above, configure the Form widget.

    Screenshot showing a form configuration with fields for "Name Parameter" and "Resource Name".

  3. And link the Form widget to the Query like it is shown below:

    Screenshot showing a form widget linked to a query, with fields for "Name Parameter" and entity selection.

  4. In this case, the standard converter Get Entity Name can be used that will pass on just the name of the entity as a string:

    Screenshot showing a UI with a single entity selection field, illustrating the step to select an entity for the "Name Parameter" field.

Name Parameter, from a free text field#

  1. Configure a Form field as free text input. This input can be passed to any name parameter without using a converter. Same as previous example but the form field is configured as string:

    Screenshot showing a free text input field for a "Name Parameter".

  2. Such a field can be easily linked like this:

    Screenshot showing a UI element with a label "Name Parameter" from a free text field, as seen in use case query 12.