Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
rohan_mulay
Partner
Partner

Storing values in a Variable in macro code

HI all,

I have written a macro code to send a service SMS to customers. I have used a Variable 'var' in macro that stores the mobile nos. of customers. These mobile nos. are picked from a field named 'Mobile' that is present in the data model.

My concern is when this variable 'var' stores only 100 records. Thus when 'Mobile field has more than 100 records, the SMS is sent only to 100 customers.

Refer following code that I used to store values in variable 'var' :

Set val=ActiveDocument.Fields("Mobile").GetPossibleValues

Kindly provide me a solution by which I can store more records in a variable.

5 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

There is no limitation to a variable and/or a field t 100 entries. I think your limitation is more from your provider to avoid spamming.

- Marcus

sfatoux72
Partner
Partner

Yes, there is a limitation.

I had the same issue two years ago.

The solution is very simple. The function GetPossibleValues has two optional parameters.

The first one define the maximum number of returned values (default is 100)

2016-03-14 13_36_26-QlikView x64 - [API Guide version 11_].png

Use for example:

Set val=ActiveDocument.Fields("Mobile").GetPossibleValues(1000)

marcus_sommer
MVP & Luminary
MVP & Luminary

Very interesting - I have never noticed this limitation probably because the fields was already limited through other selections and most often I use tableboxes to get my values, like: Re: vb scrip to display name.

- Marcus

sfatoux72
Partner
Partner

Hi,

Please validate the correct answer to help others.

anilkumarmishra
Contributor
Contributor

Please share the complete code of macro.