Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
My include script statement is not picking up variables set before the include statement.
In the beginning of the load script I declare 2 variable as shown below
Set vAppName = 'Sales Dashboard' ;
Set vConnectionName = 'lib://MYPC (LP1990)' ;
I set above variables because each QVF application has 2 folder path.
First, it sets Global folder path by including QVS file that contains set variable statements for global (attached in the post)
$(Must_Include=$(vConnectionName )\Global_Paths.qvs);
Then, it sets Local folder path by including QVS file that contains set variable statements for local folder paths (attached in the post)
$(Must_Include=$(vConnectionName )/$(vAppName)\Local_Paths.qvs);
When I run the load script. all the variables are set fine from the Global_Paths.qvs
But when the variables set from the Local_Paths.qvs are not picking the the variable vAppName.
What could be going wrong?
Hi Guys,
Thank you for your replies.
I could not figure out what was going wrong so I created a new app from scratch and it worked fine.
So I am sure its not a bug, I must have been missing something in setting variables but anyways, its working now.
Thanks for your inputs.
What do you see in the script log? Can you post the script log here?
-Rob
The script executes without any problem. but in the folder paths.. in place of $(vAppName) it just shows one forward slash symbol ( / )
And thats why I am confused because its not throwing any specific error.
I think the slash should be a back-slash like:
$(Must_Include=$(vConnectionName )\$(vAppName)\Local_Paths.qvs);
- Marcus
I tried your script and could recreate the problem. I was surprised to observe that $(vAppName) was not getting expanded every time I tried in the statement $(Must_Include=$(vConnectionName )/$(vAppName)\Local_Paths.qvs);.
I couldn't understand why.
But I made small change in the script just to have only one dollar conversion in Must_Include. This below one worked though -
Set vAppName = 'Sales DashBoard' ;
Set vAppPath = 'lib://MyDataFiles/Sales DashBoard';
Set vConnectionName = 'lib://MyDataFiles' ;
$(Must_Include=$(vConnectionName)\Global_Paths.qvs);
$(Must_Include=$(vAppPath)\Local_Paths.qvs);
Thanks Digvijay,
I think your observation right... when you add more than on dollar conversion in Must_Include. then QlikSense gets crazy
Would you call it as a bug?
I would wait for the opinion of experts here, in fact I tried this statement in trace stmt and that also missed the expansion. Not able to understand why it is happening.
I would be surprised if there is a bug within qlik sense because it worked very well within qlikview regardless how many variables with $-sign expansion are included within the include-statement - of course the variable-statements and the chain of them must be correct and the slash-sign instead of the back-slash might cause a misinterpreting.
Another point to try would be to enable the Qlik Sense Legacy mode.
- Marcus
Hi Guys,
Thank you for your replies.
I could not figure out what was going wrong so I created a new app from scratch and it worked fine.
So I am sure its not a bug, I must have been missing something in setting variables but anyways, its working now.
Thanks for your inputs.
When I enclose both the $ expension in apostrophe it works -
Set vAppName = 'Sales DashBoard' ;
Set vConnectionName = 'lib://MyDataFiles' ;
$(Must_Include=$(vConnectionName)\Global_Paths.qvs);
$(Must_Include='$(vConnectionName)\$(vAppName)'\Local_Paths.qvs);
When I remove the enclosed apostrophe, it expands only the first one and the path fails.