Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Shivam_Sahu
Contributor III
Contributor III

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
m_woolf
Master II
Master II

6 Replies
m_woolf
Master II
Master II

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
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

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

Try this:

 

jerrysvensson
Partner - Specialist II
Partner - Specialist II

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
Contributor III
Contributor III
Author

Thanks @m_woolf ,

This Macro is working as I wanted.