Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP & Luminary
MVP & Luminary

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
Highlighted
Creator III
Creator III

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

Highlighted
Master III
Master III

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.

Highlighted
Creator III
Creator III

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

Highlighted

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

Highlighted
Creator III
Creator III

@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    

Highlighted

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

Highlighted
Master III
Master III

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.