Binding expressions in on-demand template apps

Qlik Sense encapsulates all values passed as selections from the summarized application into some special variables. Those variables have a special name and content, and they are usually referred to abinding variables.

Let's assume you've made some selections (Central Partk S & 6th Ave and West St & Chambers St) in the start_station_name field. Qlik will encapsulate all values into a variable called ods_start_station_name. The ods prefix means on-demand selected values. There are other prefixes that we can choose, based on which information we need to retrieve:

Pattern

Meaning

$(ods_start_station_name)

Selected values of the start_station_name (green values) field

$(odo_start_station_name)

Optional values of the start_station_name (white values) field

$(odso_start_station_name)

Selected or optional values of the start_station_name field

$(od_start_station_name)

Same of ods (only green values) 

Usually, if we want to create SQL using a value passed in as the selected value of start_station_name, we can write the following code:

SELECT * 
FROM 'bigquery-public-data.new_york.citibike_trips'
WHERE
start_station_name into ($(odso_start_station_name){"quote": "'", "delimiter": "."})

Qlik Sense will parse your variable and consider an example where the user has selected the Central Park S & 6 Ave and West St & Chambers St values. The SQL will be rewritten as follows:

SELECT * 
FROM 'bigquery-public-data.new_york.citibike_trips'
WHERE
start_station_name into ('Central Partk S & 6 Ave', 'West St & Chambers St')

Here, the quote parameter represents how values should be surrounded and the delimiter refers to how values have to be split.

If we have only numeric values, we can use $(odso_some_numeric_field){"quote": "", "delimiter": "."}. Consequently, a list with our numeric values should be returned.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset