Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Store variable value into an external qvs file and use them in load script of another qlikview file.

Hello everyone,

I need to know how can I store value of a variable (that is provided by user through some input box on front end), into a qvs file in the following format:

set parameter1 = $(variable1)

set parameter2 = $(variable2)...and so on..

So that I can read this qvs file from load script of another qlikview file and use the parameter values to modify my data load.

1 Reply
marcus_sommer

I believe this is not possible ... but you can write it in txt-files and load it as include-variable in other qvw. You needed a trigger on the variable, which run by change and triggered a macro like this:

public sub Write

Dim fso, File, FilePfad, FileName, varName, varValue

varValue= ActiveDocument.Variables("vValue").GetContent.String

varName= ActiveDocument.Variables("vName").GetContent.String

Set fso = CreateObject("Scripting.FileSystemObject")

Set File = fso.OpenTextFile(FilePfad & FileName, 2, true)

 

File.Writeline "let " & varName & " = '" & varValue & "';"

File.Close

 

Set fso = Nothing

Set File = Nothing

end sub

variablen-load:

$(Include=FilePfadFileName.txt);

- Marcus