Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
edwinmatlapeng
Partner - Contributor III
Partner - Contributor III

How do you reference a variable passed as a ...

Evening All! How do you reference a variable passed as a parameter in a load script? Why is a long story suffice to say I want to create a qvd file for each flat file I load for other processes which will save us a lot of time and resources.

1 Solution

Accepted Solutions
edwinmatlapeng
Partner - Contributor III
Partner - Contributor III
Author

I had to change the run statement. Got it to work. Thank you.

objShell.Run """c:\Program Files\QlikView\QV.exe"" /r /vqvdFileName="&mid(sourceFile.Name,1,7)&" C:\QlikView Working Area\QV Data\Other Files\QV1.qvw", 1, true

View solution in original post

3 Replies
swuehl
MVP
MVP

If I understand you correctly, you reference this variable just like any other variable you create in the load script.

Starting QlikView ‒ QlikView

Script variables ‒ QlikView

edwinmatlapeng
Partner - Contributor III
Partner - Contributor III
Author

Thank you for the response, Stefan. I appreciate that.

I think my problem then lies with my objShell.Run command. This is a part my batch file script from where I run objShell.Run. I am not sure if I need to assign the file name on the Run command or like I am doing. Also, can I assign the parameter like I am doing here?

  qvdFileName = mid(sourceFile.Name,1,7) + ".qvd"

  'Set ErrorCode = 0

  Set objShell = CreateObject("WScript.Shell")

    objShell.Run """c:\Program Files\QlikView\QV.exe /r /v" /vqvdFileName "C:\QlikView Working Area\QV Data\Other Files\QV1.qvw", 1, true

Can you see anything wrong, please?

edwinmatlapeng
Partner - Contributor III
Partner - Contributor III
Author

I had to change the run statement. Got it to work. Thank you.

objShell.Run """c:\Program Files\QlikView\QV.exe"" /r /vqvdFileName="&mid(sourceFile.Name,1,7)&" C:\QlikView Working Area\QV Data\Other Files\QV1.qvw", 1, true