Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

getSelectedValues always returns 100 macro

Hi everyone,

I am trying to write with a macro to a database. so far so good everything is working perfect if i have less than 100 values selected in my field. but as soon my selection is greater than 100 getSelectedValues.Count always returns 100 even though the count would be 190.

How can i solve this problem and has anyone came across this problem??

regards,

MT

1 Solution

Accepted Solutions
Not applicable
Author

Hi Magdalena,

The default value for the count of values returned is 100. To change this limit you can use the following sentence in your macro:

GetSelectedValues(Integer MaxNoOfValues, Boolean UseDefaultSortOrder)

For example GetSelectedValues(120)

I am not sure if this function allow values more bigger than 100 but you can try with this.


Regards.

View solution in original post

7 Replies
Not applicable
Author

Hi Magdalena

I'm not sure what exactly are you doing in your marco, but it may not be coincidence that 100 is a default row limit for File Wizard (User Preferences => Design).

What's getSelectedValues?

Lukasz

Not applicable
Author

getSelectedValues is a function were you can get all the selected values from a field in the macro. And my question is if there is a limit because then i have to figure something else out or if I am doing something wrong.

regards,

MT

Not applicable
Author

anyone?

Not applicable
Author

Hi Magdalena,

The default value for the count of values returned is 100. To change this limit you can use the following sentence in your macro:

GetSelectedValues(Integer MaxNoOfValues, Boolean UseDefaultSortOrder)

For example GetSelectedValues(120)

I am not sure if this function allow values more bigger than 100 but you can try with this.


Regards.

Not applicable
Author

Thanks for you answer!! It solved this problem.

regards

martinpohl
Partner - Master
Partner - Master

Hello Magdalena,

unfortunaly GetPossibleValues().Count returns max 100.

You can set the number in the statement e.g.

GetPossibleValues(500).Count

this will count the values until 500.

I have not find a way to set this limit dependend on the numbers of datas

Hope this helps

Not applicable
Author

I just created an action on any selectionn were I set the value of a variable v=getSelectedCount(fieldname) and then i am getting the value of this variable in my macro like var = ActiveDocument.Variables("v").GetContent.String and then you use getSelectedValues(var).

regards