Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

GetPossibleCount() != Count of Fields().GetPossibleValues

I'm having a bit of an issue with a macro that I'm writing.  I'm trying to fetch all possible values for a field so that I can loop through them.  There are about 357 values with my current criteria.  When I use the expression GetPossibleCount(), it returns the proper number of values.  However, when I retrieve a list of the values using GetPossibleValues, I only get 100.  Is there a limit to what Qlikview allows to bring back in a Macro? 

Here is the code that I am using to test the differences in a macro:

 

set keys = ActiveDocument.Fields("Ret_Key").GetPossibleValues
msgbox(keys.Count)
msgbox(ActiveDocument.evaluate("=getpossiblecount(Ret_Key)"))

The first dialog returns 100 while the second 357.  It is the same field.  I would have expected the same response.  Is there a document setting that I need to change?

Thanks.

James

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The getpossiblevalues function has a default maximum results value of 100. The function takes an optional parameter to specify the maximum results it should return.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

The getpossiblevalues function has a default maximum results value of 100. The function takes an optional parameter to specify the maximum results it should return.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you!  I would have never known that.  I guess it is so optional that it isn't in the API documentation.  Thanks again.