Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a problem with variables when app get reloaded.
Let me use a simple example to understand the stuff:
- Suppose that i have a document with a variable vTest.
- I publish the document on the server with the variable vTest configured with default value 1
- A user modifies the contents of the variable [vTest] to 5. If, during user's analysis, the document is reloaded on the server (data is updated), the content of the variable is automatically set to the default value 1.
I don't wanna this behaviour, i need to keep the user defined value 5 even after the reload
Does anyone have had that problem before and how to keep variables values ?
Thank you for the help
Just mark this variable for inclusion in bookmarks and it will survive reloads. (Settings > Document properties > Variables > Settings for Selected Variable > Include in Bookmarks).
Describe more related how user going to select, I mean with in Input box?
Hi Anil,
The variable value is changed with button actions and not input box.
Hi,
How are you defining a vairable?
I would guess that you are defining in Script something like
LET vTest = 1;
Comment out the line in the script, this should stop it being changed at reload and keep the last value entered.
If this is no the case you probably have a trigger set up to reset it.
Mark
you probably are trying to achieve something like this:
Save variable VALUE from application to text, csv, qvs, or qvd file
Hi Mark,
I'm actually not initialize the variable in script, and i dont have any triggers in application.
i use this steps to create a variable
Settings -------> Variable Overview --------------> Add
and to change a variable value i use button action
thank you
Hi again,
Probably down to the reload.
When you reload an app is the application moved from a Source Doc's folder to a User Doc's Folder?
I think you will find the Document your loading from has the variable set to 1 and the Document being viewed by your user is being replaced with the reloaded one.
A quick way check for this is to change the variable in the source document and see if on the next reload the number changes.
If this is the case i don't think there is an easy way to change this, sorry.
Mark
Hello Mark,
Yeah, i tried that. After every reload, the value of the variable back to default value. 😕
Actually, i think it's not only about variables but all app objects are reset to original version after every reload, for exemple when i move or i change an text object, the value and the location backs to default after the reload.
thank you
regards,
Idriss
Hello Jonathan,
Do you mean, that i should save my variables values with a macro in a file, and reset them later with script during the reload ?
regards,
Idriss
i suppose that can be done with a macro.
This example allows editing value of a variable and saving to qvd by Reload action;