Discussion Board for collaboration related to QlikView App Development.
I am writhing a Macro.
How can I get the value of a selected field.
Also is there any documentation for writing a macro in Qlikview where I can find functions and Examples.
If you install your QlikView Desktop with "Complete" option you will find the documentation under <Program Files>QlikView\Documentation
- APIGuide.qvw - will show you how you can access QV Objects in Macro
Also, the Help of QV Desktop might give you some guidance as well.
As to how to access the selected value/s, you can use ActiveDocument.Fields(<Field Name>).GetSelectedValues method. Please refer to API Guide for details.
I hope this helps.
Thanks for your reply... The API guide is really helpful
However, I am struggling in implementing the GetSelectedValues Function.
Can you please give me an example.
set myfield = ActiveDocument.Fields("EmployeeName").GetPossibleValues
for each emps in myfield
I tried running your code but it is throwing an error.
Can you please provide me with an alternative code.
I got this correct:
set v = ActiveDocument.Variables("a")
set myfield = ActiveDocument.Fields("MONTH_NUM").GetPossibleValues(1)
For i = 0 to myfield.Count-1
sub theFieldValues ()
for i=0 to myfield.count-1
K = myfield.Item(i).Text