Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
aghabdurauf
Contributor III
Contributor III

Selecting file using variable

Hi,

I have 3 folders Q1, Q2, Q3 which contain the same file name 'Trial Balance'. The user inputs the folder name in sheet which will set the variable and only that folder file will be loaded.

Now what will be the condition in script. 

Labels (2)
3 Replies
MK9885
Master II
Master II

Can you please explain more?

3 folders have same file name 'Trial Balance'?

This file an Excel File or Text Document?

And what value are users inputting inside Trial Balance File?

There can be variables to read from an excel file or TXT file.

Or even it is possible to change a value inside TXT file, which in turns update values on your dashboard. 

maushmi
Contributor II
Contributor II

1.Include these name of the folder Q1,Q2 and Q3 under column (May be inline load).
2.In the dashboard create a button which will SET the variable V1 with the value selected - Q1,Q2 or Q3.
3.Set a Full path of the source folder which will have variable V1 instead of the folder name. After making selection through list box which will have the values Q1 , Q2 and Q3, Variable V1 will be always declared with the Value selected . and then the complete path will have the folder name selected by user . This path will now be included in the load part of the script.

Brett_Bleess
Former Employee
Former Employee

There is one other way to go at this, use an Include file with the three different calls, and they just uncomment the one they want to use, save and run the script..

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Syste...

If you did use one of the other solutions do not forget to close the thread by using the Accept as Solution button on that post.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.