Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
abe786
New Contributor III

How to find common values between 2 strings in UI

I have 2 strings which contain multiple numeric values like 

String 1: 123, 456, 789

String 2: 234, 567, 456, 231, 123


Is there anyway I can return the common values between 2 strings i.e. 123 and 456 ?

4 Replies
Highlighted

Re: How to find common values between 2 strings in UI

If you have four rows like?

String 1: 123, 456, 789

String 2: 234, 567, 456, 231, 123

String 3: 1234, 4567, 789

String 4: 2345, 567, 4567, 231, 123

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
MVP
MVP

Re: How to find common values between 2 strings in UI

Doing it in UI using qlik function would not be very dynamic. Script solution would the best way to go. Otherwise create your own function as macro and then use; again using macro function has it's limitations.
Highlighted
abe786
New Contributor III

Re: How to find common values between 2 strings in UI

Actually these string are dynamically generated based on user selections. I need the intersection to be computed and stored in a variable. I was thinking of doing same with an variable starting with = If I go the macro way, probably I would need an action to invoke the macro on each user selection ? 

Highlighted
MVP
MVP

Re: How to find common values between 2 strings in UI

Macro function would not need an action. However, using user-defined macro function in the server
and client environment might not be very smooth. Could you please create a sample app and explain the expected output there with business scenario?