Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
Below is the code we could get in API Guide, in order to loop through values in a field "Month".
Sub MonthValues
set ArrayVal=ActiveDocument.Fields("Month").GetPossibleValues
for i=0 to ArrayVal.Count-1
msgbox(ArrayVal.Item(i).Text)
next
End Sub
I would like to know if there is another way to get similar functionality, without using arrays in the code.
Above code works like a charm in Subroutines, but doesn't in User Defined Function (UDF); if the UDF is used in the Script. In my case I need to use the UDF in Load Script.
Thanks for you help in advance,
JP
for i =1 to fieldvaluecount('Month')
//do stuff
next
That's understood, could you help with code in msgbox please.
And, this is in VBScript or Macros of QlikView, not in Script.
Above code works like a charm in Subroutines, but doesn't in User Defined Function (UDF); if the UDF is used in the Script. In my case I need to use the UDF in Load Script
And, this is in VBScript or Macros of QlikView, not in Script.
Can you please make up your mind about what you want?
In the UI use vbscript with arrays. In the script use a for loop with fieldvaluecount. Check the help file for how to use the MsgBox function in the script.