Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
PedroC
Contributor III
Contributor III

Expressions in variables and bookmarks

Hi everybody,

 

There is a quite new feature in Qlik Sense Enterprise on Windows that allows the user to save variables in bookmarks.

As developers we use variables to save user input but mainly use them to save expressions to be used in titles or even to simplify set analysis expressions in master items.

 

Now we've realized that if a user saves a bookmark including variables, the contens of all the variables will be replaced once the bookmark is applied.

This is a huge problem because expressions are usually modified through the app life cycle and bookmarks will prevent those changes to happen.

 

For instance:

1.- Developing the app we create a variable vFractile as:

      fractile(value, 0.8)

2.- The user creates a bookmark and checks to save variables

3.- Later on, instead of P80 we must change the variable to P90:

      fractile(value, 0.9)

4.- The user applies the bookmark and our expressions goes back to previous version resulting on wrong app behaviour.

 

Also, while developing the apps, we've found that applying a bookmark defined as "default" will replace the contents of the variable with the obsolete one, but the variable editor will still be showing the newer version (correct). This makes debugging a headache!

Has anybody face this problem and found a workaround?

 

Thanks in advance!

 

 

 

Labels (1)
1 Solution
4 Replies
Kushal_Chawda

PedroC
Contributor III
Contributor III
Author

Hi @Kushal_Chawda,

The video is about how to create dynamic bookmarks.

My problem is about using expressions in variables that are later saved in a bookmark. Most of the time those variables are not meant to be changed by the user and simply act as a way to simplify development. 

When they are saved in the bookmark what's really been saved is a piece of code that may change over time, so the user has the chance to "undo" changes on code with no intention at all.

Thanks anyway

PedroC
Contributor III
Contributor III
Author

Thanks @Kushal_Chawda, sure this is somehow a workaround. 

Setting variables with expressions within the script is not a common thing to do, but it's always good to know that this variables are not stored in bookmarks.

I think it far more usefull if we can choose whether a variables should be stored in bookmark or not at design time. I'll go ahead and publish this as an idea.

Thanks!