Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a 'report.ini' file, with report names and filters to search my data by.
E.g
Orange Report =Fruit like 'Orange*'
I need to make a button (Action or Macro) that will apply the pre-made search string to my data, I've attached an example to show what I mean.
The idea being that I can make a large list of pre-made reports and search filters, and just add them to the report.ini file as needed.
This is similar to bookmarks, except my search string might not return any results.
If I tried to use a bookmark in this situation, it wouldn't store the raw search string I was using (as it wasn't able to make any selections).
I think i'll almost there, but not quite sure on the final stage.
Thanks,
Peter.
Hi Peter,
instead of "Filter" in SearchString try "=Filter". The thing is working here if I add the "=".
Rgds,
Joachim
Hi Peter,
instead of "Filter" in SearchString try "=Filter". The thing is working here if I add the "=".
Rgds,
Joachim
Thanks again Joachim!
that was about the only thing i hadn't tried 🙂
I guess you have this working, but it seems like a pretty unusual approach to me. In my applications, I'd likely apply the filter at load time to build a new field, like "Fruit Category". So if(left(Fruit,6)='Orange','Orange',if(...)) as "Fruit Category". The user would then just select a Fruit Category of Orange rather than clicking on the Orange button. Or if you really want an Orange button, such as if you have a nice picture of an orange that they can click on, the action can be to select the Orange Fruit Category rather than all Orange Fruit. Just a thought.
Hello,
Why is it that if you copy the exact same string generated by "=Filter" and place it on the Search String field, it does not work?
I've been trying to define a Search String to delect two values with that same expression but it does not seem to work out.
Any help, please?
The "=" syntax means you're specifying a QlikView expression that will be evaluated for each row of the list box, just like you'd made a chart with that as the dimension. Anything with a non-zero value will be selected. The "=" syntax is NOT a way of generating a normal search string.
Looking for two specific values using the "=" syntax could be done like this:
=match(MyField,'Value1','Value2')
Our shop is still officially on 8.5. I have unofficially downloaded 9.0, but haven't played with the actions yet. It sounds like the actions simply don't support advanced searches. A potentially-painful workaround would be to code it as a macro, with all the headaches that can entail. I'm not thinking of anything else, but perhaps it's simple, and I just don't have enough 9.0 experience.
Mike,
The search string value can contain an expression. So to generate an expression as a search argument, you have to use this syntax.
='=expression'
Note that you have to generate the "=" as part of the expression result. So to use a match expression for the field named Key for values 'A', 'B' the search string box value would be:
='= match(Key, ' & chr(39) & 'A' & chr(39) & ',' & chr(39) & 'B' & chr(39) & ')'
It gets a bit ugly because of the need for quotes. There might be a simpler syntax, but you get the idea -- include a leading "=" in the expression result.
-Rob
Great! It works!
Thank you very much Rob!