Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mantaq10
Contributor III
Contributor III

Get List of Answers from a list of selected values on another field

Hi all,

how do I get the list of values (Answers) from a field, say A based on a selection of values (Selected Values) from a field B using scripting or macros?

Regards, Atif

1 Solution

Accepted Solutions
mike_garcia
Luminary Alumni
Luminary Alumni

The Function concat() will give you a string containing all the possible values in a field. You specify the delimiter (can be a comma, for example).

I hope that is what you are looking for.

Mike.

Miguel García
Qlik Expert, Author and Trainer

View solution in original post

6 Replies
vupen
Partner - Creator
Partner - Creator

I think you are looking for something like this:

<code>

' Possible Values
Set val=ActiveDocument.Fields("ANSWERS").GetPossibleValues
For i=0 to val.Count-1
iChartCount = iChartCount + 1
msgbox(val.Item(i).Text)

Next

</code>

Not applicable

pls attach a qvw file or a snapshot of that to get a clear picture of what exactly you want.

thanks

mantaq10
Contributor III
Contributor III
Author

Thanks Upendra,

Actually, i want to get access to all the answers and non-answers, I dont have any field by the name of ANSWERS. I am looking for values which are considered as 'answers' by a selection of values on another field.

Look at the attachment, i want a list of the three cities, Atlanta, Dubai Jeddah as a collection/array/variable etc.

mantaq10
Contributor III
Contributor III
Author

The right terminology is "Optional" and "Excluded" values....

Is there a way to programmatically get access to them?

NOOb pleads.....:)

mike_garcia
Luminary Alumni
Luminary Alumni

The Function concat() will give you a string containing all the possible values in a field. You specify the delimiter (can be a comma, for example).

I hope that is what you are looking for.

Mike.

Miguel García
Qlik Expert, Author and Trainer
mantaq10
Contributor III
Contributor III
Author

Thanks Mike, this is exactly what i was looking for...:)