Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
NareshGuntur
Partner - Specialist
Partner - Specialist

Session Recovery in Ajax

Hi,

When I am trying to recover the session in Ajax(Close and Restore at the right top of the window), the values of the variables are getting lost.

Let me make it more clear.

I have a variable V1=1.

I go to a particular sheet and there I have a trigger to set a value to the variable.

Set Variable V1=2.

Then when I recover the session, it is taking me back to the sheet where I have lost the session but it again shows the value of the variable as V1=1 which should be 2.

Did anyone came across this?

Cheers,

Naresh

1 Solution

Accepted Solutions
NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi All,

Thanks for your replies.

This can be done by checking the box, Include in bookmarks of that variable under document properties.

This will actually save the values of the variables even when the session is lost.

Cheers,

Naresh

View solution in original post

14 Replies
Anonymous
Not applicable

Maybe you have an "on open" trigger that resets the variable?

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi Michael,

Thanks for the response.

But NO. I don't have any of the document triggers activated.

Cheers,

Naresh

Not applicable

Hi,

are you reloading your dashboard and your script is setting the variable v1=1

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi Abhishek,

I am not reloading the document. I am just recovering the session and then the variable V1 shows value 1.

Cheers,

Naresh

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi,

Please find the attached QVW.

When the button is clicked, I have given an action to set the value of a variable(Variable1=1 in Main sheet and Variable1=2 in the other) and it will assign once I click on the button. However, if the session is lost in access point(Ajax), the value will be shown as 0 again. Any idea?

Cheers,

Naresh

Anonymous
Not applicable

Naresh,

I just noticed that you use "Close and Restore at the right top of the window".  Nothing's wrong with your application, apparently it just work this way.  I tried using "close/restore" in another app, and it works the same way as you've described - variables reset to the values which are in the saved file.

If you simply close your browser (or tab) or go back to the access point, and reopen the application after that, the variables keep their values in AJAX.

Regards,

Michael

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi Michael,

Thank You for your response again. So, this can be treated as a bug? Because, if you recover the session(Close & Restore), the user will be taken back to the same sheet but with different data(if you are using the values of the variables to calculate something).

Cheers,

Naresh

Anonymous
Not applicable

Naresh,

I've never used this "Close" before, and don't have any expectations.  If you decide to contact QlikTech Support about it, let us know what they say.

Regards,

Michael

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi Michael,

Its not just Close/Restore. It is same as recovering a session after certain inactive time. And if I get a chance to contact QlikTech Support, I'll let you know. Thanks again for your time.

Cheers,

Naresh