Gossamer Forum
Home : Products : DBMan : Customization :

search dilema

Quote Reply
search dilema
I have a gender field as a list with values "Male" and "Female" - the problem is, unless the search is case sensitive or matches whole words, a search for "Male" would list both male and feMALE. Since I need to use "Male/Female" as values and not, say, "Gentlemen/Ladies", is there a way to change the code so that no mater what the search options are, that specic field will ALWAYS be case sensitive?

I can always default that option on for ALL searches, but since the other fields would work best with out case sensitivity I'd like to someway to allow the rest of the fields to rely on the user specified options.
Quote Reply
Re: search dilema In reply to
You know what? never mind.. Silly me:

All I had to do is ad a SPACE in front of the two radio button values so when I do a search for male it really searches " Male"... just tried it and it worked perfectly!

Actually if there IS a code adjustment to this I would be curious to see it anyway if anyone else has already come across this.
Quote Reply
Re: search dilema In reply to
Sorry. That works BUT for some reason a when a space begins the value those values are not displayed when modifying a record (typically existing values appear as the default value in edit)

I'm stumped
Quote Reply
Re: search dilema In reply to
It has to be "Male/Female"? Can't it be "M/F"? That would take care of it.

The reason it doesn't work to add a space is that the script takes out leading and trailing spaces when the form is parsed.

Another way to assure that your "Male/Female" would work, aside from case sensitivity, is to set the "Whole Words" option as a default.

------------------
JPD





Quote Reply
Re: search dilema In reply to
The way the field is used in other areas requires the whole word or I would need alot of "if M print Male" type lines all over... not impossible, but if I could fix the parser to leave leading spaces it would be an easier fix. (The only two uses for radio buttons are both for gender assignments.)