Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select all fields where value occur

I've got 3 fields; ID, Name1, Name2. I've created an input box with a list of all the names that may occur in either field. Now I want to create a Select field-action that finds any occurence of the name. I guess I need to create a fourth field in the script that merges all names, and then do a wildcard search in that field and select the ID-field when a match is found. If that is the correct solution, what is then the correct search string syntax?

Example:

IDName1Name2
1JohnJohn
2LisaAnna
3JohnRuth
4AnnaPeter
5PeterJohn

If I select "John" in the input box the following should be selected:

IDName1Name2
1JohnJohn
3JohnRuth
5PeterJohn

How do I accomplish this?

Thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

Excellent, thank you a lot! There was an ampersand missing and by removing the $-sign (don't know what it does). I got it working with this formula:

='=Name1=' &chr(39)& vInputBox &chr(39) & ' or Name2=' &chr(39)& vInputBox &chr(39)

View solution in original post

2 Replies
swuehl
MVP
MVP

IMHO, selecting in ID field is the right approach.

You can create a Select - Select in field action for a button action and then create a search string like

='=Name1=' &chr(39)& $(vInputBox) &chr(39) ' or Name2=' &chr(39)& $(vInputBox) &chr(39)

Not applicable
Author

Excellent, thank you a lot! There was an ampersand missing and by removing the $-sign (don't know what it does). I got it working with this formula:

='=Name1=' &chr(39)& vInputBox &chr(39) & ' or Name2=' &chr(39)& vInputBox &chr(39)