Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kalyanireddy
Contributor II
Contributor II

requirement to capture the selections and need to store the selections with name dynamically.

Hi All,

We have a requirement to capture the selections and need to store the selections with name dynamically (the name should change every time)

Suppose.,

 

Selction1: prod1+Franchise1+Territory1 (these are the selections)

Selection2: prod2+mexico+Franchise2

Selection3: Rep3+Teamid+Terrotryid.......up to N selections

 

While storing/saving these selections the name should be like Capture1,Capture2,Capture3......up to N Capturing’s.

These names should be Continue even the app is refreshed / closed /again opened from last name (from recently saving name)

 

For example ,

Today i have saved 5 captures with the names like capture1 capture2 capture3 capture4 capture5.

Then next day if i opened the app and start saving/ storing the selections the saving name should  be start from capture6, capture7 ,capture8...etc.., ( continuously).

It should not be again start from capture1 capture2 capture3 capture4 capture5.

 

And also is there any way to show all the selections at the same time in a Table/Object dynamically in Qliksense.

 

Labels (4)
7 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @kalyanireddy 

The Bookmarks features should help you, Did you try it? and If you did, why it did not work for you?

Creating Bookmarks 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
kalyanireddy
Contributor II
Contributor II
Author

Hi @ArnadoSandoval .

I tried with dynamic bookmarking by using variables it's working as expected in running session,

but after every refresh the variable value is coming back to starting position.

for example...

my variable value 1 then...when ever i click on particular button..it will creates dynamic bookmark with name of boookmark1 and in 2nd click the name should be bookmark2 then bookmark3...up to bookmarkN.

but when i am doing this after every refresh...it is staring from again bookmark1,

in my case the bookmark name should start after last created bookmark name.

(bookmark name should be continues at any cost).

 

 

ArnadoSandoval
Specialist II
Specialist II

Hi @kalyanireddy 

Would you please be able to share the code you are using to generate the dynamic bookmark? It will be easier to help you, instead to create the logic that could be different and take a longer time to find a solution.

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
kalyanireddy
Contributor II
Contributor II
Author

Thank you for the response @ArnadoSandoval  ,

To create a dynamic bookmarks I created 2variables as below.

VNum = 1;

VNumIncrement = $(vNum);

Then in kpi object I added action create bookmark

Under that in bookmark title my expression is Capture &'-'& $(VNumIncrement).

And my second action is set variable

Under that I added vNum variable and value as $(VNum) +1.

 

After these actions I am able to create the dynamic bookmarks when I clicked on that kpi object within the live session only.

After refreshing the app again the variable is back to starting position in my case it needs to be continues.

 

 

ArnadoSandoval
Specialist II
Specialist II

Hi @kalyanireddy 

Sorry for the late reply, I had to some research before completing a solution, as it seems you are not using the QlikSense built-in button; I think you are using: Vizlib Button! actually you were pretty close to implement this functionality into your solution.

Overview:

  • I created an application to test drive the solution I am proposing.
  • I installed the Vizlib Button, because you can create bookmark with it (Qlik's button does not create bookmarks).
  • You should be aware of the scope of variables, as We have Script and Visualization variables.
  • Script variables are defined within the load script, and they are re-initialized each time we "load the data" (refresh).
  • The Visualization variables are more permanent, as refreshing the data does not initialize them.

Solution:

I created two scripts variables; notice the introduction of a SET variable, vResult, with the shown expression, while the variable vNumIncrement will be a visualization variable.

Let vNum = 1;
Set vResult = [(vNumIncrement + vNum)];

Visualization variable vNumIncrement; this variable is never initialized by refreshing (reloading) the data.

Visualization-Variable-01.png

Warning, once the application is in production, and some bookmark had been generating editing the variable my desynchronize the bookmark naming logic, this is a big WARNING do not touch once in production.

The User Interface of my Test solution (its name is: Preserve Value) is shown below:

Visualization-Variable-02.png

It has 3 buttons at the top, the first, with the label Increment feature a Qlik button, it does not have an action to create bookmarks; the BookMark is a Vizlib button, it feature an action to create bookmarks; the last button Reset, reset the value of vNumIncrement to zero.

BookMark button: Implement two actions: (a) Updates the variable vNumIncrement by assigning the SET variable vResult. (b) Creates the bookmark.

The UI has additional visualization to track the values of the variables involved and a very small set dataset with 3 records, allowing to apply some selections to bookmark.

Bookmarks example:

Visualization-Variable-03.png

Testing:

This application was tested by these actions:

  1. Add the first two Capture bookmarks.
  2. Reload the data.
  3. Added the next Capture bookmark.
  4. Closed and re-open the application adding the last Capture bookmark.

Requirements:

  • The attached qvf (with the application shown above) required the Vizlib button.

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
kalyanireddy
Contributor II
Contributor II
Author

Thank you for the solution @ArnadoSandoval ,

I tried the solution what you suggested ,

initially it was created sequence of bookmarks then i tried multiple times refreshing the app and tried to create bookmarks Then it was not giving results as expected(not in sequence the visualization variable coming back to start position).

and i checked the app after published also,

in my scenario there is a multiple users, the users should see the there own bookmarks not the others,

but in this case all the bookmarks are open to all users.

 

 

and is there any way to show all the multiple bookmarks in table with the content of list of bookmarks and selected list of items in there respective fields.

anyone can help on this really appreciated your help.

ArnadoSandoval
Specialist II
Specialist II

Hi @kalyanireddy 

Would it be possible that you attach screenshots of what you describe with words?

Regards,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.