Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I am currently working on a custom bookmarking solution in my web application. I know that there is support for creating bookmarks through the Bookmark API, but for reasons I won't go bore you with I decided to go with a customized approach. As part of it, I am using the Engine API to retrieve the selected values of certain fields, and store those field's qElemNumber separately for later use. It occurred to me that because these qElemNumbers are Qlik Sense's way of internally indexing field values, they may not match when data is added/modified.
For instance, User A makes selections on Country and selects the following values:
User A then decides they want to make a bookmark for their current selections. We store the values [1, 2, 3] in our custom bookmark. A week goes by and User A is using our app and wants to apply the bookmark they had previously made. We retrieve the stored values and call the SelectListObjectValues() method from the Engine API. The problem is, 2 days ago the app was reloaded and "Japan" was added as a possible country.
My question is, will the qElemNumbers still match what they were previously, or will this cause the bookmark to make the wrong selections? Also, if anyone knows how Qlik Sense stores bookmarks internally, it would be good to know.
The qElemNumbers are assigned to the values in script load order. Loading different values or even the same set of values in a different order will change the assigned qElemNumbers .
The Qlik Sense bookmarks retains the set of qText values, or the search argument if a search was used.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
The qElemNumbers are assigned to the values in script load order. Loading different values or even the same set of values in a different order will change the assigned qElemNumbers .
The Qlik Sense bookmarks retains the set of qText values, or the search argument if a search was used.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Awesome! Thanks for the info Rob!
I discovered something through my testing and thought I would share it. If you make a ListObject using an expression for the field (e.g. =if(Continent = 'North America', Country) or =aggr(only({1<Continent = {'North America'}>} DISTINCT Country, Country)), the qElemNumbers of the values that are returned through GetListObjectData() will NOT be the same as the qElemNumbers of 'Country'.
I assume this is because Qlik Sense is creating some transient field based on the expression rather than just reducing the field.
Just thought I'd share 🙂