Topic: Search multiple fields using one Input

Hi everyone,

I want to enable searching on my form. However, it seems we can only search one field at a time with an input text.

Is there any way to use just one input field to search multiple fields from a table? For example, I have a field for a name and another one for a last name. Is there any way to search both using just one input, regardless of whether we're searching for a name or a last name? I don't want to use any combinations of both.

Many thanks!

Re: Search multiple fields using one Input

Hi Sonixax,
Try using a calculated field that concatenates all the individual fields that you wish to search on.
Please be aware that you need to use 'ifnull' in the syntax of your calculated field, otherwise a row that contains an empty field (ie first name is blank or middle name is blank or last name is blank) will not show in the search results.
Alternatively, if the fields you use in your concatenation are all mandatory, then this is not an issue and the syntax of the calculated field is simpler.
Have a look at the attachment as an example,
Regards,
Derek.

Post's attachments

Attachment icon concatenate names.zip 451.8 kb, 36 downloads since 2024-04-01