Search Form Functionality

Hi Experts,

We need to implement the below scenario in search forms for particular field,

we have drop down field, which has the following values,

Banyan

Banyan Duplex

When I an seraching with "Banyan" value, the result contains "Banyan Duplex" values too. So basically what i understood is, search is behaving as like operator not as = operator.

How can i restrict this behaviour for that particular field. SO it is like, if i search for banyan, it should show only the records with "Banyan" vale. not with Banyan Duplex.

Suggestions are appreciated.

Thanks in advance,.

Regards,

Shalini R

 

  • Hi,

     

    You will have to go to link of the search form and modify the query. Use = instead of #.

  • So - 

    The problem is, from a search screen, the system always assumes you're performing a 'starts-with' query.  There's no real way around it.  If you're dealing with a Link, then sure - you can modify the '$query' variable to use an equals (=) instead of a starts-with (#), but if you're on a search screen, the function that turns the contents of the search form into the query always assumes you're doing a # unless you specify differently.

    That's one of the reasons for a code vs value difference.  For example, in the location table, there is a 'location', 'location.name' and 'location.code' fields.  The idea is that your location.code values will be unique enough that two locations with similar names can be found by searching their codes instead.  Or, as another example, the 'environment' value in the device table can hold a code for environment (i.e prod, pFix, pre-prod') and the system can display a more friendly value (Production, Production Fix, Production Readiness).  Take a look at other dropdowns that use different values between Display List and Value List as examples.

    Aside from that, you can teach users to actually use the = sign on the search screen.  For example, instead of 'Banyan', they enter '=Banyan' into the search screen, the system will search for records where the value is explicit to Banyan and will filter out Banyan Duplex.