Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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

Re: Select all fields where value occur

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)

2 Replies
MVP
MVP

Re: Select all fields where value occur

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

Re: Select all fields where value occur

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)