Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Shivam_Sahu
New Contributor II

Macro to read text file and set variable externally

Hi All

 

 

I want macro to read text file inside which I have created a variable say

SET vQVW ="myqlikviewvariablevalue"

I want to use this variable when I open my application.

Can any share macro for this purpose.

Labels (3)
1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: Macro to read text file and set variable externally

Try this:

 

6 Replies
mwoolf
Honored Contributor II

Re: Macro to read text file and set variable externally

No need for a macro. Read the text file in your load script. If you search the forum for "read variables from text file", you will find many examples. Here's one: https://community.qlik.com/t5/QlikView-App-Development/set-variable-from-text-file/m-p/321019

Shivam_Sahu
New Contributor II

Re: Macro to read text file and set variable externally

Mwoolf,
I know this way but,
I dont want to load application ,My requirements is like that when I open a Qv application variable value should have been set.

Shivam_Sahu
New Contributor II

Re: Macro to read text file and set variable externally

Can anyone share their idea for this?
I think macro will do the job with on open trigger.
mwoolf
Honored Contributor II

Re: Macro to read text file and set variable externally

Try this:

 

Partner
Partner

Re: Macro to read text file and set variable externally

Is this suppose to happen when published?
In that case you have to use plugin, Ajax (WebView) doesn't have local file access.
Shivam_Sahu
New Contributor II

Re: Macro to read text file and set variable externally

Thanks @mwoolf ,

This Macro is working as I wanted.