Is it possible? If so, what’s the best way?
I know I can run a “Find” and select x Health,
click “New Request” then x Transportation,
click “New Request” then x Mental Health, and
then “Perform Find” which will return all the entries/records that have any of those options selected.
This is the correct answer. Multiple Find requests operate as a logical "OR". Placing multiple criteria on the same requests results in a logical "AND".
If you want a user to be able to check off a series of options and then find as an OR, you can automate that through scripting.
Thank you Mike,
but, could you elaborate on how I would go about doing that using a checkbox set?
Using a checkbox set is actually feeding a list (a text field with values separated by ¶'s).
If the text field is a global and you have a relationship connecting that global with the service field of your table, you can use go to related records to select 'em all.
I'm assuming by "do that" you mean script it so the user doesn't have to create the new Find requests himself. Do this:
1) Create a global text field and assign it the same value list as the field you're looking in.
2) Create a script that follows these steps:
- Display global field to user
- Waits for user input
- Loops over the values in the global field and creates a new Find request for each value
In order to understand how this works, you should know that a checkbox set is stored as a return delimited list. In other words, each time a user checks a box, it's added to the field not pasted on, but in list form, like this:
So, to access the values one at a time, you can use the GetValue ( ) function. I suggest something like this:
Enter Find Mode
Exit Loop If
New Record / Request
Set Error Capture
Set Error Capture
(Insert additional error capture steps here)
Procedurally, I would use a popover to display the global field and include a button to perform the Find. Don't try to pause the script and then perform the Find; that's a security issue.
This would be an "OR search" because multi-line keys to multi-line keys find any (that's the beauty of them).
and the ORDER of the return-delimited values might not match, so it's not an "=" won't work either.
I would likely use a FIND (first value) and a CONSTRAIN (2nd value) and another CONSTRAIN (3rd value). This finds any with allthree_values_. This does NOT omit with other values, however.
Bev, did you read the OP's request ?
"Is there a way that I could run a “Find” using a “Checkbox set” as an “OR” statement? In other words is there a way I can run a “Find”, select more than one box in the "checkbox set" and have the “Find” return all the agencies/programs that have any of the selected boxes?"
Or maybe you agree with me, and your reply is simply supportive ? I'm not sure...
yes, and I was mentioning Multi-line keys. The order of checkboxes won't match with "=", so the multi-line key is good.
I always forget about that one ...