Wednesday 21 September 2011

QlikView : Macro Function for Get Selected ListBox Value

this macro will help you for get selected list box values. the selected values may be single or multiple.

Single:
SUB GetSelectedValues
     SET fx = ActiveDocument.Fields("UA_NewGroup")
     SET fxV = fx.GetSelectedValues   
       if fxV.Count=1 then                  
            msgbox(fxV(i).Text)       
       end if              
END SUB

Multiple:
SUB GetSelectedValues
     SET fx = ActiveDocument.Fields("UA_NewGroup")
     SET fxV = fx.GetSelectedValues

     FOR i = 0 TO fxV.Count -1                           
            msgbox(fxV(i).Text)                      
     NEXT
END SUB

No comments:

Post a Comment