Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

How to make field selection in an Alternate State with API

Employee
Employee

How to make field selection in an Alternate State with API

With Sense 2.1 I was searching the Developers help on how to make a field selection in an Alternate State per API

(For those who don't know what it is: A 2nd or 3rd or more parallel selection model available to the user in addition to the default main selection. It requries an API call to introduce alternate states within a Sense app e.g. see this project Qlik Branch )

The Field API (part of Capability API) seem to allow selection changes only in the main state unless there is any undocumented second parameter to provide the alternate state in which the change should take place.

https://help.qlik.com/sense/2.1/en-us/developer/#../Subsystems/APIs/Content/MashupAPI/qlik-field-int...

  • Is there any way to achieve this with another API (e.g. BackendAPI)?
  • Is there anywhere a method to copy a whole selection to an Alternate State? (like a bookmark that is called in another state)?

Thanks

Tags (1)
Comments
Employee
Employee

Just found out myself, that on app level I can get the field in a specific state

var app = qlik.currApp(this);

var myField = app.field('Country', 'AlternateState'); 

However I now like to make a selection in that field based on a formula (=Country LIKE 'A*') and the method field.selectValues seems to accept only constants ... Any idea of the syntax to set a selection formula rather than an array of members?

Version history
Revision #:
1 of 1
Last update:
‎01-11-2016 05:28 AM
Updated by: