Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
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
MVP & Luminary
MVP & Luminary

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 & "';"



Set fso = Nothing

Set File = Nothing

end sub



- Marcus