Honored Contributor.
Honored Contributor.

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 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,.


Shalini R


2 Replies
Absent Member.. Absent Member..
Absent Member..

Re: Search Form Functionality



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

Hardit Singh
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Search Form Functionality

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.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.