Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

search string from field through input box

Hi all,

My application has a input box, and a straight table.

i have a field called "Category"

CategoryRank
Email Reports5
Redaction3
Adding Email2


My Question - i want to type any of the available string in the input box, For Eg. 'email' then my straight table should bring "Email Reports" and "Adding Email", because both have the text called "Email"

like this.

CategoryRank
Adding Email2
Email Reports5


i have attached my application, can have a look at it.

Please help me.

Thanks

Ren

9 Replies
Not applicable

Hi Ren,

Instead of Input Box, you can try multibox object and search any string like Email. You will get desired output.

Regards,

Raj Kishor

renjithpl
Specialist
Specialist
Author

that actually works, but the user wants a input box, because category has a huge number of data. Thanks. 🙂

johnw
Champion III
Champion III


renjithpl wrote:that actually works, but the user wants a input box, because category has a huge number of data. Thanks. 🙂


I'm not sure what the difference is. With a list box or multibox, they can click on it, type "email", and it will select all categories with "email" in them so that only those categories display. With an input box, they can click on it, type "email", you kick off an action to select all the categories with "email" in them so that only those categories display. I'm not understanding how one is any easier than the other from a user's perspective. And if there's no actual user advantage to a "new" way of interacting with QlikView, I strongly suggest just training your users to work with QlikView as intended.

But anyway, it looks like you've already solved the problem. Put an action on the variable that makes the appropriate search and select. Looks like all you need to do is change the search string to ='*'&EnterCategory&'*'. And since you've already figured out all the hard part, and that's the easy part, surely I've just misunderstood your question.

So what is it you want? Or was that it?

renjithpl
Specialist
Specialist
Author

Hi john, i used ='*'&EnterCategory&'*' this is what i wanted, it worked perfectly, thanks a lot. Smile

renjithpl
Specialist
Specialist
Author

hi john,

is that possible to selcet more than two parameters, Eg. "email" and "Redaction" in the above example.

Thanks

Ren

johnw
Champion III
Champion III

QlikView handles this with "Advanced Search", and it can get pretty complicated. For intance, in a Category list box search, you could type this:

=Category like '*email*' or Category like '*redaction*'

Or this:

=wildmatch(Category,'*email*','*redaction*')

So I guess you'd want to duplicate this feature but using an input box. You can't use the "=" in the input box, because it will then calculate the value rather than passing it to your search. So you'd need some other character. I'll use "$" for the sake of argument. You then need to convert it to an "=" in the triggered action. Putting this in the action's search expression seems to allow for advanced searching.

=if(left(EnterCategory,1)='$','='&mid(EnterCategory,2),'*'&EnterCategory&'*')

I'm not thrilled with it, but it works, and it behaves almost exactly like QlikView searching normally behaves, which I think is generally desirable.

renjithpl
Specialist
Specialist
Author

hi john,

i am sorry, i dint understand what you explained here, when i tried to put your coding in the input box expression, its giving value, its not giving me a search option. how to convert '$' to an '=' in the triggered action. Thanks a ton.

johnw
Champion III
Champion III

Settings -> Document Properties -> Triggers -> Variable Event Triggers -> EnterCategory -> OnInput -> Edit Actions(s) -> Search String

=if(left(EnterCategory,1)='$','='&mid(EnterCategory,2),'*'&EnterCategory&'*')

Then enter a search string like:

$Category like '*reports*' or Category like '*redac*'

See attached.

renjithpl
Specialist
Specialist
Author

Great job, john, i really thank you for your help.