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: 
Not applicable

Load script - Include QVS error - Qlik Sense

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. 

  • Global folder paths (Shared by every other apps too) and
  • local folder paths (only used by that specific app).

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?

1 Solution

Accepted Solutions
Not applicable
Author

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.

View solution in original post

9 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

What do you see in the script log? Can you post the script log here?

-Rob

Not applicable
Author

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.

marcus_sommer

I think the slash should be a back-slash like:

$(Must_Include=$(vConnectionName )\$(vAppName)\Local_Paths.qvs);

- Marcus

Digvijay_Singh

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);

Capture.PNG

Not applicable
Author

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?

Digvijay_Singh

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.

marcus_sommer

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

Not applicable
Author

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.

Digvijay_Singh

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.