The Prompt tab in Pragmatic Studio is used to configure the specific behavior of the Prompt field, which is displayed only for this selected field. This tab contains several configuration sections that define how the component functions.



Configurations

DataSource

  • Datasource: This field specifies the data source from which the list of options for the prompt will be retrieved.



Filters tab

In the Filters tab, the filters that will be executed for the data query are defined.

Add filter section

Here, necessary filters for the query can be added. It is similar to the configuration in the Grid tab.

  • Title: The descriptive title of the filter.
  • Type: The data type of the filter, which can be number, text, boolean, or date.
  • DataSource field: The input field of the datasource that the filter will target.

Filters section

Displays all added filters, allowing sorting, modification, and deletion of existing ones.

Grid tab

In the Grid tab, the columns that will be displayed from the resulting data of the query are specified.

Allows pagination

This option should only be enabled if the associated datasource has the LIMIT and OFFSET parameters implemented to correctly paginate the results.

Below is an example of a datasource configured with pagination, containing the LIMIT and OFFSET parameters provided by Pragmatic:

Add column section

Defines the columns to be displayed in the grid. It is similar to the configuration in the Grid tab.

  • Title: The descriptive title of the column.
  • Type: The data type of the column, which can be number, text, boolean, or date.
  • DataSource field: The output field of the datasource that the column will display.

Columns section

Displays the added columns and allows modifying the display order.

Return type tab

In the Return Type tab, the information that will be displayed when selecting a query option is specified.

Identifier field

This is the field that will serve as the identifier to be recorded in the responses of the form instance.

Description field

Allows selecting the columns from the Columns tab that will be displayed when an option is selected, and the search modal is closed.

Configuring the prompt

Before proceeding with the configuration of a Prompt, it is important to ensure that a compatible datasource is used. This datasource must be correctly defined with input and output parameters provided by Pragmatic Studio.



Step 1: Select datasource

Select the datasource that will be used for the Prompt query. Ensure that the datasource has defined input and output parameters to map the search filters and the columns to be displayed. To learn more about datasources, visit this link.



Step 2: Configure filters

  • Navigate to the “Filters” tab.
  • In the “Add filter” section, define the filters that will be used for the search. Specify the input parameters for each filter and click the “Add” button to include it.
  • Optionally, make additional modifications in the “Filters” section if necessary to correct or change the filter order.



Step 3: Configure grid

  • Go to the “Grid” tab.
  • In the “Add Column” section, add the columns for the data to be displayed. Define the output parameters for each column, mapping them to the datasource columns, and click the “Add” button to include the column.
  • Optionally, make additional modifications in the “Columns” section to adjust the order or correct details of the created columns.



Step 4: Configure Return type

Navigate to the “Return type” tab. Define the identifier field and select the description fields that will be displayed for the selected option.



Step 5: Save configuration

Once the configuration is complete, ensure you press the “Save” button in the configuration side menu to store all the changes made.