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: 
pnn44794
Partner - Specialist
Partner - Specialist

How do you give users the ability to input a list of values on which to search a document?

Hello:

First, thanks in advance for any and all help.  I need to provide a mechanism where end users can input a list of values from an Excel spreadsheet, a Word document, an Email, etc to search by within a Qlikview document.  I can have the users use a specific format, i.e. comma or space separated values.  I'm pretty sure this can be done in Qlikview as I've seen a post and then an article by Barry Harmsen, but I believe the solutions are for older versions of Qlikview (or I'm just not getting it).  I'm currently running on 11.20.13206 SR13 64 Bit Edition.

The search needs to be able to search a Listbox, a Straight table or a Pivot Table.  I assume once the search is completed, any graphs / charts would change based on the selection or is that wrong?\

Again, thanks in advance.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Like this perhaps?

='(' &

  Replace(Trim(

    Replace(

      Replace(vSearch_HN

      , ',', ' ')

    , chr(10), ' '))

  , ' ', '|')

& ')'

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

8 Replies
settu_periasamy
Master III
Master III

pnn44794
Partner - Specialist
Partner - Specialist
Author

Settu:

Sorry for the delay.  It's been a crazy day at work.  Anyway...........

No, I had not seen this.  I downloaded the sample and successfully added the code.  It works great.  I may though, have a couple of follow on questions later, but for now, to help me learn, I think the Replace expression is doing the following and I hope you or someone can confirm this.

I believe the search replace expression is essentially saying, "Look for a comma and replace it with a space, then trim the space and replace it with a pipe".  Is that right?

settu_periasamy
Master III
Master III

Yes, you are right. suppose if you are having the data in excel (like row wise), you can paste the same into input box, and replace the Newline Chr(10)  to Pipeline.

pnn44794
Partner - Specialist
Partner - Specialist
Author

Can replacing the Newline Chr be incorporated into the following anf if so, what change would I need to make?

='('&replace(trim(replace(vSearch_HN,',',' ') ),' ','|')&')'

pnn44794
Partner - Specialist
Partner - Specialist
Author

How do I incorporate the replacement of the Newline character in the following line of code?  I need to be able to accept a comma separated list and one copied from an Excel spreadsheet.  I get this and I'll flag the response as the correct answer.  Thanks in advance.

='('&replace(trim(replace(vSearch_HN,',',' ') ),' ','|')&')'

avinashelite

Could please share the sample data set ??

jonathandienst
Partner - Champion III
Partner - Champion III

Like this perhaps?

='(' &

  Replace(Trim(

    Replace(

      Replace(vSearch_HN

      , ',', ' ')

    , chr(10), ' '))

  , ' ', '|')

& ')'

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pnn44794
Partner - Specialist
Partner - Specialist
Author

That does it!  Awesome.  Thank you very much.