Page 1 of 1
Limit Search on a browse form to just one column?
Posted: Fri Feb 17, 2023 1:55 pm
by Keith-i
Is there a simple way to restrict the search on a browse form to just one column. The default seems to be to search all columns.
Re: Limit Search on a browse form to just one column?
Posted: Fri Feb 17, 2023 2:34 pm
by kev1n
Manually via Options Menu:
searchable_columns.png
By Code:
nuSetNoSearchColumns()
This function excludes a list of columns from being searched on the current Browse Form.
A new function has been added to nuBuilder: nuSetSearchColumns()
This function includes a list of columns from being searched on the current Browse Form, all other columns are excluded.
E.g. include only the first column:
Re: Limit Search on a browse form to just one column?
Posted: Fri Jun 02, 2023 10:13 am
by DRHH
I am a complete nuBuilder novice with only a few hours experience.
This is exactly what I want to do, but where do I put the call to nuSetSearchColumns?
Re: Limit Search on a browse form to just one column?
Posted: Fri Jun 02, 2023 10:19 am
by kev1n
Hi,
Place that code in the form's Custom Code.
1) Click on the "Options Menu"
2) Select "Form Properties"
3) Select the "Custom Code" Tab
4) Click on the "Browse" button
5) Write your code in the JavaScript field.
custom_code.png
Re: Limit Search on a browse form to just one column?
Posted: Fri Jun 02, 2023 1:12 pm
by DRHH
Hello Kevin,
Thanks for your quick response.
I have now got this to work using NuSetNoSearchColumns()
nuSetSearchColumns() does not work for me. Perhaps I am not using the latest version.
Your screenshot above shows a Version Info option in the drop down menu, but I don't see this.
Re: Limit Search on a browse form to just one column?
Posted: Fri Jun 02, 2023 1:15 pm
by kev1n
What version are you using? (See button Setup -> Setup tab)
nuSetSearchColumns() was added on February 17th
Re: Limit Search on a browse form to just one column?
Posted: Fri Jun 02, 2023 5:00 pm
by DRHH
DB Version V.4.5-2023.04.10.00
Files version V.4.5-2023.05.01.02
Re: Limit Search on a browse form to just one column?
Posted: Fri Jun 02, 2023 5:01 pm
by kev1n
DRHH wrote: ↑Fri Jun 02, 2023 1:12 pm
nuSetSearchColumns() does not work for me. Perhaps I am not using the latest version.
Please show the full code.