Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
baarathi
Creator III
Creator III

Accessing variable

Is it possible to use variable declared in one app to be used in another app?

For Example : If Let varLastReload = 8 in Qliksense app named as Temp1

                        Can I use Let varLastExec = '$(varLastReload)' in another qliksense app Temp2  which refers to varLastReload in Temp1

8 Replies
afurtado
Partner Ambassador/MVP
Partner Ambassador/MVP

no.

But you can store this variable in a QVD file and load it again in other model

LastExec:

LOAD

      '$(varLastReload)'   as LastReload

autogenerate(1);


store LastExec into LastExec.qvd ;




in other model you can just load the LastExec.qvd

furtado@farolbi.com.br
baarathi
Creator III
Creator III
Author

Alessandro Furtado, Can you please let me know about the use of autogenerate(1) in the above script?

Digvijay_Singh

autogenerate is the way to create qlik sense table records manually in the script. 'One' means one row. So you are actually storing variable value in a table field and then storing/persisting it as qvd which can be read in any other application.

baarathi
Creator III
Creator III
Author

instead of having a fixed value as 1, is it possible to have n rows?

Anonymous
Not applicable

Can you advise the context of your question ?  As in what end result you are after.

baarathi
Creator III
Creator III
Author

@Bill Markham, I want to create a log of last reload date.

ID    Date

1      1st Reload Date

2      2nd Reload Date

..            .....

n)      nth reload date    

Anonymous
Not applicable

I do that by incrementally loading the reload run date etc.... into a QVD.

Digvijay_Singh

Yes, you can. It depends on how do you want to use it. If I understand your need correctly, you can add this one row in last created QVD by first loading the QVD and adding new record through autogenerate using concatenate keyword.