Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to create a button that will select all records where the same value, say 'abc' is in either of 2 fields. It could potentially only be in 1 of the 2 fields. So in SQL it would be something like this:
select * from table1
where field1 = 'abc' OR field2 = 'abc'.
Any ideas?
As I understand, "select records" is not the same in this case as "select values in fields". That is, there should be a record ID that is selected when the condition is met.
See attached. There is field ID, where the selection is made, and fields F1 and F2. To select all records where F1=d or F2=d, enter 'd' in the input box (variable vSelecytion), and click on the text box below it. It has action "Toggle Select". Look at the search string, all logic is there:
='('&concat({<F1={$(vSelection)}>+<F2={$(vSelection)}>} distinct ID, '|')&')'
As I understand, "select records" is not the same in this case as "select values in fields". That is, there should be a record ID that is selected when the condition is met.
See attached. There is field ID, where the selection is made, and fields F1 and F2. To select all records where F1=d or F2=d, enter 'd' in the input box (variable vSelecytion), and click on the text box below it. It has action "Toggle Select". Look at the search string, all logic is there:
='('&concat({<F1={$(vSelection)}>+<F2={$(vSelection)}>} distinct ID, '|')&')'
Once again a nice solution, Michael! Like it!
/Christian
Hi JO,
Maybe you can try using a Bookmark with your multiple values, then in your button, add an Action "apply bookmark", finally add bookmark ID and taht all.
Best regards.
JO
Your bookmark will store the wild search. So applying a bookmark is a better option.
Regards
Thank you Michael, that's exactly what I was looking for and makes perfect sense!
Sorry for bumping an old thread. Just wanted to thank for a wonderful solution.
Hi @Anonymous
This is wonderful and I am working on something like this.
for the same functionality, can I pass same multiple values in input box using delimiter?
search multiple values in multiple fields with OR
also, what if I don't have an ID Field?