March 18, 200718 yr I am trying to write a script that performs a find using values entered in checkboxes. For example, for a field which holds languages spoken (English, French, Spanish, etc.) how would I perform a find for all records listing French? Many thanks in advance,
March 18, 200718 yr The field that has the languages spoken is a text field that is formatted for checkboxes and uses a value list that contains the languages spoken choices, correct? Possible script: enter find mode [pause] (user enters their find criteria during the pause) perform find[] put a button on your find layout "Perform Find" that is set to Resume script. Depending on your interface, you could dedicate a layout for finding (since you don't want the "Perform Find" button on your data entry layout) or use the data entry layout and have the user click the continue button to have the script perform the find.
March 18, 200718 yr Hi you can even perform a find with a relationship ( w/o a script ) languages_spoken.zip
March 18, 200718 yr Hi Daniele, That will work, but if the user searches French and English (meaning they want the person to speak both french and english) a GTRR on a multi-key returns people who speak french or people who speak english (people who speak french and english exist as a subset). Just a general note -- That's why i hesitate to use checkboxes for anything but boolean values... or where a user will only ever search one value or where an "OR" GTRR will suffice. On the other hand... you could use a global field and a small patterncount function if only 4 languages are ever spoken (or a CF for completley dynamic)... Anyway then you just search the calc field -- but it's not indexable so that's slow as hell for large record sets.
March 19, 200718 yr http://en.wikipedia.org/wiki/Praying_mantis I just like it cause it's head is turned funny... Like a puppy that doesn't understand something.
March 19, 200718 yr ... but if the user searches French and English like this ? BTW: The female praying mantis is known for her habit of biting the head off her partner while they are mating languages_spoken.zip
March 19, 200718 yr Can't check at the moment but probably LOL Re: the praying mantis, yes i know that, think it is a good representation of what happens with people too, not literally but... (jking)
March 19, 200718 yr If you want to find someone who speaks english ( AND possibly other languages ) you can go on with the first example's search If you want to find someone who speaks english ( AND no other other languages ) you can go on with the secon example's search ;)
March 20, 200718 yr Yes... but what if i want to do both?.. obviously not at once but at different times?
Create an account or sign in to comment