Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Riccardo
Partner - Creator III
Partner - Creator III

TravelArea on the fly with variables

Hello,

in SaaS with GeoOperations, can I use TravelArea with variables? Like this

 

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(V_POL_COST)", costUnit="$(V_POL_COST_UNIT)", transportation="$(V_POL_TRAS)")', '$(V_POL_LON_LAT)')

 

And the variables are written on input variables.

Thanks

Riccardo

Riccardo Schillaci
BI Analyst
Datawarehouse & Business Intelligence
Labels (1)
1 Solution

Accepted Solutions
Riccardo
Partner - Creator III
Partner - Creator III
Author

It works fine, on Qlik Sense SaaS.

 

I'm able to generate a travelarea on the fly with input variables, without reload the app itself and without any table inside the script.

In the position field inside the area layer maps, put it:

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(V_POL_COST)", costUnit="$(V_POL_COST_UNIT)", transportation="$(V_POL_TRAS)")', '$(V_POL_LON_LAT)')

and 4 input variables

V_POL_LON_LAT is for a Longitude and Latitude value (ex. [40.123,12.123])

 

Riccardo Schillaci
BI Analyst
Datawarehouse & Business Intelligence

View solution in original post

4 Replies
Riccardo
Partner - Creator III
Partner - Creator III
Author

It works fine, on Qlik Sense SaaS.

 

I'm able to generate a travelarea on the fly with input variables, without reload the app itself and without any table inside the script.

In the position field inside the area layer maps, put it:

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(V_POL_COST)", costUnit="$(V_POL_COST_UNIT)", transportation="$(V_POL_TRAS)")', '$(V_POL_LON_LAT)')

and 4 input variables

V_POL_LON_LAT is for a Longitude and Latitude value (ex. [40.123,12.123])

 

Riccardo Schillaci
BI Analyst
Datawarehouse & Business Intelligence
Patric_Nordstrom
Employee
Employee

See also more examples of using variables as input when using geooperations in runtime here:

https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/GeoOperations-Examples-Qlik-GeoAnalytics/t...

 

NashaYussof
Partner - Contributor II
Partner - Contributor II

I have tried! Nice one! Thanks for sharing @Riccardo 

nashayussof_0-1623416373394.png

 

Hi @Patric_Nordstrom 

Do you think we can do the same for geo-operation binning? Dynamic binning size based on user input  at the dashboard. I saw in documentation, binning operation is only supported in load scripts.

Patric_Nordstrom
Employee
Employee

@NashaYussof Binning is not supported in runtime. GeoOperations is based on SSE and in runtime the result is returned as an expression over a dimension. It's not possible to know beforehand how many bins are returned so hence it would be difficult to do it in runtime.