Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a qlikview application with a few sliders to control variable values.
How do I make my sliders read/write the variable values from/to an external file?
// First load the variables from an external source, in this example, an xls file.
Variables:
LOAD Varname,
Varvalue
FROM
Variables_Input.xls
(biff, embedded labels, table is MyVars1$)
;
// Process each row of the Variables table
FOR i = 0 to NoOfRows('Variables')-1
LET vVarname = peek('Varname',$(i),'Variables');
LET $(vVarname)=peek('Varvalue',$(i),'Variables');
NEXT i
// Clean up temp script vars
SET i=;
SET vVarname=;
DROP TABLE Variables; // No longer need table
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
// First load the variables from an external source, in this example, an xls file.
Variables:
LOAD Varname,
Varvalue
FROM
Variables_Input.xls
(biff, embedded labels, table is MyVars1$)
;
// Process each row of the Variables table
FOR i = 0 to NoOfRows('Variables')-1
LET vVarname = peek('Varname',$(i),'Variables');
LET $(vVarname)=peek('Varvalue',$(i),'Variables');
NEXT i
// Clean up temp script vars
SET i=;
SET vVarname=;
DROP TABLE Variables; // No longer need table
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Thanks for the reply, Rwunderlich
How about writing back to the external file?
I was looking for a solution that also wrote the variable value back to the external file when the sliders are changed by the user.
Writing to the file system from QlikView Server UI is challenging. In QV Desktop you can use a macro attached to a button. Not sure if you could do that from a QV Server app. It's been a while since I've worked with QV Server.
-Rob
Did you consider the use of bookmarks to enable the users to store their (variable)-selections?
- Marcus