Calling an input value from a widget
Introduction
Both types of inputs can be used as variable elements for widgets. The widget's query must reference the required input through a script placed in the part of the query you want to substitute with the input values. This script consists of the input ID, a dot, and the word value (InputID.value
), and can be accompanied by an operator depending on the function the input values fulfill inside the query.
About IDs
All widget and input ID values are assigned automatically when created and can be read in the Data settings of the widget or input element.
Expressions and operators
Depending on the data to be entered in the input and their function inside the widget query, you can use the following types of expressions and operators:
In the widget | In the input |
---|---|
| |
Use this expression in the widget query as a placeholder for whole queries. | Enter the required query in the input and the widget will display the query results. |
Example
| Example
|
| |
Use the | Enter the required filtering options in the input and the widget will display the result of the filter operation. Â |
Example
| Example
|
| |
Use the | Enter the required query part or field in the input and the widget will display the results. |
Example
| Example
|
These expressions will make your widgets show data according to the content introduced in the inputs referenced in their queries, however, they will not show anything until the input contains valid values. If you want them to show content prior to manual selection, you can further configure them as explained in the following article: Show data in widgets before entering values in inputs
Examples
You can use multiple inputs simultaneously to generate a widget able to display different sets of data with just a few clicks. Below are some examples that may help you better understand the potential of inputs.
Â
Related articles: