Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
hedborg
Contributor

Macro limitations of 100 iterations?

Hi,

I have a macro solution that seemed to randomly stop and my original assumption was that it was caused by bad coding or bad data of some sort.

But, after quite a bit of trouble shooting it looks like QlikView limits my for-statement to 100 even if my selection amounts to 100+ field values.

Short version of the macro:

    Dim i

    for i = 0 to mySelections.Count - 1

    Dim FieldMainValue

    FieldMainValue = mySelections.Item(i).text

    ActiveDocument.Fields(FieldMain).Select FieldMainValue 

   Print_PDF FieldMainValue, "RP01"

   Next

Is anyone aware of any settings/limits that could be changed?

Kind regards

Niklas

1 Solution

Accepted Solutions
Highlighted

Re: Macro limitations of 100 iterations?

Hi Niklas, maybe you assign values to mySelections using a function like GetSelectedValues, GetPossibleValues... those functions has a parameter to limit how many values you want to get and 100 is the default value.

You can set another number:

ActiveDocument.fields("FieldName").GetPossibleValues(1000, true)

View solution in original post

2 Replies
Highlighted

Re: Macro limitations of 100 iterations?

Hi Niklas, maybe you assign values to mySelections using a function like GetSelectedValues, GetPossibleValues... those functions has a parameter to limit how many values you want to get and 100 is the default value.

You can set another number:

ActiveDocument.fields("FieldName").GetPossibleValues(1000, true)

View solution in original post

hedborg
Contributor

Re: Macro limitations of 100 iterations?

Amazing.

Was just about to check how many values that I had actually selected:

    set mySelections = ActiveDocument.Fields(FieldMain).GetPossibleValues

    Dim NrOfValues

  NrOfValues = "Number of selected values: " & mySelections.Count

  msgbox(NrOfValues)

And of course your were right.

set mySelections = ActiveDocument.Fields(FieldMain).GetPossibleValues(1000)


Thanks a lot!


Niklas