Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys.
First post.
Have a shared folder on Dropbox.
With Excel Sheets in it.
There are currently 3 people on the shared folder.
I can only open the Qlikview Model on one of the 3 pcs.
The reason is because the file path is different.
So which ever pc I want to open it on I first have to change the file path.
All 3 of us need to be able to open the model at any time.
Can you please assist with the code required in order to solve this problem?
Really appreciate it.
Hi,
You can make a relative path according to the user.
So, you can do something like this in the script:
if( osuser() = 'user1') then
vPath = 'C:\Teste\';
else if (osuser() = 'user2') then
vPath = 'C:\Teste2\';
end if;
Load *
From [ $(vPath)\App.qvd] (qvd);
Regards,
Hi Mauri,
Thanks so much for the feedback.
I have worked quite a bit on QlikView front end, however, I am not that familiar with the back end.
Still learning step for step.
Should this go in the main tab in the script?
Does this seem right to you? For some reason it's not working.
if(osuser() = 'user1') then
vPath = 'C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx';
else
if (osuser() = 'user2') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx';
else
if (osuser() = 'user3') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx';
end if;
Load *
From [ $(vPath)\Follow Ups (The Nets) V1.2.qvd] (qvd);
Appreciate your input.
Thank you!
You can check this:
What's the issue you're getting?
Hi,
Try this:
if(osuser() = 'user1') then
vPath = 'C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user2') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user3') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';
end if;
Load *
From [$(vPath)\Follow Ups 2018 07 24 (Zone 4).xlsx;
or
if(osuser() = 'user1') then
vPath = 'C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user2') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user3') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';
end if;
Load * [ $(vPath)\Follow Ups (The Nets) V1.2.qvd] (qvd);
In your expression, vPath has xlsx path and load in statement you are fetching the qvd.
Thanks,
Pooja
Hi, Kevin,
Yes, this go, in the main script tab.
So, I gonna try to explain the idea of the script.
What this script does is get your network user (osuser()) when you reload the applcation (qvw). Then according to the user, you can change path to access the xls or qvd.
Some correction, that you need to do:
First you have to check the osuser() in each PC, that you and your members are using. For that, you can create a text box in the application -> properties -> text-> =OsUser().
After that, you can adjust the expression according to the correponding values in each PC
if(osuser() = Put your osuser that you find on the text box) then
else
if (osuser() = Put the osuser of member 2) then
else
if (osuser() = Put user of member 3) then
end if;
The second part is adjust the vPath according to what Pooja Nagaraj said.
Because, in your script, you're trying to find a file in this path
C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx\Follow Ups (The Nets) V1.2.qvd] (qvd)
Do you need to load the excel and the qvd?
Regards,
Hi Bala Bhaskar,
Thank you for the link.
I'm working on this project after hours - sorry it has taken me long to reply. Feel like I hit a roadblock now. The design is easier for me then working on the script.
Thanks for your help.
I think I'm still unsure of the syntax and what order the code must be in.
I'll send another message explaining what I mean
Thanks Pooja,
I think the script is still a bit overwhelming.
Design is easier for me.
Going to try out and get back to you
Hi Mauri.
Thanks for your help. Really appreciate everyone's input!
I want to code this in a qlikview document which is pulling info from an excel sheet.
Sorry, I think it is a typo from my side. As far as I can see it should only be the excel sheet that loads.
Thank you