Show default data before entering values in an input
Overview
Widgets linked to an input (both the input and select type) automatically show data, even before you enter or select a value in the corresponding input. Furthermore, you can add the following pattern to the widget query to make it show the query data before selecting a specific value in the input.
isempty(input_reference) or input_script
For example, the following query can be used to show all the available method values in a specific widget before you enter a specific method to filter your data in the Input0.
query(
from demo.ecommerce.data
where isempty($Input0.value) or method = $Input0.value)
You can also use the following syntax to show a specific value in the widget before using the input:
$(input_reference|specific_value)
In the following example, the Select0 input will show the user@devo.com value by default before you select another value in the input.
query(from web.activity.all
group every - by username
where username=$(Select0.value|"user@devo.com")
select count())