Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

subform lookup filtering

Questions related to using nuBuilder Forte.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: subform lookup filtering

Unread post by admin »

Timo,

Its working for me.
browse1.PNG
Steven
You do not have the required permissions to view the files attached to this post.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: subform lookup filtering

Unread post 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)
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: subform lookup filtering

Unread post by Timo »

Correct - it just happens in the tab [Forms], in the grid.
acclevel.png
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: subform lookup filtering

Unread post by admin »

This is what I've got.
browse3.PNG

Steven
You do not have the required permissions to view the files attached to this post.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: subform lookup filtering

Unread post 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.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: subform lookup filtering

Unread post by admin »

Timo,

Thanks for that.

Its all fixed now on Github.

Steven
Post Reply