Jump to content

Searching for specific check box option/s only


scoony

This topic is 2415 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a request from a colleague in the office to be able to search for records that only have a specific checkbox or checkboxes activated in a global field derived from a value list. Therefore ignoring those that have additional or other boxes checked. 

So far I have played with the following script. I'm typing this from memory so haven't added in error capture etc. 

Set Field ($search ; "==" & client::interests)          Note.  client::interests is selected by the user from checkbox options

Enter FInd Mode [ ] 

Set Field (client::interests ; $gsearch)

Perform Find [ ]

 

So for example:- 

3 records and the client::interest field options as follows. 

1: Tennis, Football, horseracing, Rugby    2: Tennis Rugby    3: Rugby, Sailing, Tennis

Set Field ($search ; "==" & "Tennis Rugby")

Enter FInd Mode [ ] 

Set Field (client::interests ; $gsearch)

Perform Find [ ]

ONLY records 2 should be returned.

 

It works but as an exact match if I ensure both client::interests and $gsearch are sorted A-Z  and can fall over if carriage returns exists and so on. Just not confident this is the best and most robust way to solve the issue. Any thoughts appreciated. 

 

Thanks Zab

Link to comment
Share on other sites

You could make a smaller card window, with just the checkboxes as global fields, with a 'Cancel' and 'Search' button.  Cancel would clear the globals, close the window.

Search would gather the globals, close the window and perform an 'or' find by looping thru each value.

Something like this:

script.docx

Link to comment
Share on other sites

This topic is 2415 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.