Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting different count on Field and list box possible values

Hi all,

Hope someone else has come accross this and can point out my misconception.

The code below gives me 100 and then 197. The Stat box for that field shows 198 as the count, which ties up with 197 as I believe the ubound starts at 0. But why does the field GetPossibleValues count only return 100??


sub getcount
set x = ActiveDocument.Fields("CAT_PartNo").GetPossibleValues
msgbox x.Count
set LB = ActiveDocument.GetSheetObject("LB02") 'Contains CAT_PartNo
msgbox (ubound(boxvalues))
end sub


TIA,

Jane

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Get possible values has a default limit of 100 values. Look at the parameters in the API guide. You can set it to another level if you need to pull more values.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Get possible values has a default limit of 100 values. Look at the parameters in the API guide. You can set it to another level if you need to pull more values.

Not applicable
Author

Hi Thanks for that, I know you will think this is a stupid question but how do I return the count of the possible selections into a variable?

Having a complete mental block here.

TIA Jane

Not applicable
Author

Found it!!


set fld=ActiveDocument.GetField("CAT_PartNo")
msgbox ("The field has "& fld.GetValueCount(1) &" selected values")