Page 2 of 2

Re: subform lookup filtering

Posted: Fri Mar 30, 2018 10:14 am
by admin
Timo,

Its working for me.
browse1.PNG
Steven

Re: subform lookup filtering

Posted: Fri Mar 30, 2018 10:43 am
by toms
Timo wrote:Let me try. Open up [Access Levels] from home, select the tab [Forms]. In the Grid, enter a code in the form field (lookup). e.g. a string form. After hitting the enter key, a popup form opens.
I expect the browse form to be prefiltered, showing only records that contain form. This is not the case, all records are shown. As mentioned before, this just happens with lookup object in a subform grid. In a normal edit form it works just fine. I hope it's more clear now...
Steven, Timo talking about the forms tab, the grid and not the user tab (also shown in his screenshots)

Re: subform lookup filtering

Posted: Fri Mar 30, 2018 11:05 am
by Timo
Correct - it just happens in the tab [Forms], in the grid.
acclevel.png

Re: subform lookup filtering

Posted: Fri Mar 30, 2018 11:51 am
by admin
This is what I've got.
browse3.PNG

Steven

Re: subform lookup filtering

Posted: Fri Mar 30, 2018 2:19 pm
by Timo
Strange that it works for you. I inspected the sql, it looks like this. This will always return all rows as the first condition is always true.

Code: Select all

SELECT zzzzsys_form_id,sfo_type,sfo_code,sfo_description
 FROM zzzzsys_form
  WHERE (zzzzsys_form_id NOT LIKE 'nu%' AND sfo_type != 'subform') OR zzzzsys_form_id IN ('nuaccess', 'nuuser', 'nulaunchdates', 'nutranslate', 'nupassword', 'nufile', 'nuuserhome') AND ( (CONVERT(sfo_type USING utf8) LIKE  "%nuu%" OR CONVERT(sfo_code USING utf8) LIKE  "%nuu%" OR CONVERT(sfo_description USING utf8) LIKE  "%nuu%") )
 ORDER BY sfo_code
There should really be brackets around the first conditions in order to make the search work

SELECT zzzzsys_form_id,sfo_type,sfo_code,sfo_description
FROM zzzzsys_form
WHERE ((zzzzsys_form_id NOT LIKE 'nu%' AND sfo_type != 'subform') OR zzzzsys_form_id IN ('nuaccess', 'nuuser', 'nulaunchdates', 'nutranslate', 'nupassword', 'nufile', 'nuuserhome')) AND ( (CONVERT(sfo_type USING utf8) LIKE "%nuu%" OR CONVERT(sfo_code USING utf8) LIKE "%nuu%" OR CONVERT(sfo_description USING utf8) LIKE "%nuu%") ) ORDER BY sfo_code

BTW, I've updated nuBuilder from GitHub and run the update.

Re: subform lookup filtering

Posted: Sun Apr 01, 2018 9:14 pm
by admin
Timo,

Thanks for that.

Its all fixed now on Github.

Steven