Page 1 of 2
subform lookup filtering
Posted: Tue Mar 27, 2018 10:17 am
by Timo
Hi all, my subform contains lookup fields, each row contains one. If I enter a code in the lookup input and press enter, the lookup form opens (So far, so good). But the form is not filtered. Only records that match the code should be displayed. This also does not work in the "Access Levels"/ Tab "Forms" . Is it a bug?
Re: subform lookup filtering
Posted: Wed Mar 28, 2018 2:58 am
by admin
Timo,
Can you post an example of what you mean?
Steven
Re: subform lookup filtering
Posted: Wed Mar 28, 2018 4:49 am
by Timo
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...
Re: subform lookup filtering
Posted: Wed Mar 28, 2018 8:28 am
by admin
Timo,
Sorry, I meant a screen shot.
(make it as easy for me to understand as you can.)
Steven
Re: subform lookup filtering
Posted: Wed Mar 28, 2018 9:36 am
by Timo
1. type
nu in the lookup field, hit [RETURN] or click the search icon.
acclevel.png
2. the browse popup opens but no filter is applied.
popupbrowse.png
Re: subform lookup filtering
Posted: Thu Mar 29, 2018 1:31 am
by admin
Timo,
Is it the same with other lookups?
Steven
Re: subform lookup filtering
Posted: Thu Mar 29, 2018 3:53 am
by Timo
It happens in another form of mine, too. But I'm glad I found a solution. The important thing is that the brackets are set correctly. The access levels form uses the form nunonsystemform as lookup browse form. I've added two brackets around the where clause and all works fine. I applied the same fix to my other form.
SELECT * 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'))
ORDER BY sfo_code
Re: subform lookup filtering
Posted: Fri Mar 30, 2018 5:55 am
by Timo
You think this fix can be put on GitHub? Thank you.
Re: subform lookup filtering
Posted: Fri Mar 30, 2018 6:24 am
by admin
Timo,
I think I've fixed the problem in the latest patch.
Let me know if it works for you now.
Steven
Re: subform lookup filtering
Posted: Fri Mar 30, 2018 9:12 am
by Timo
Hi, although the search string (nu) is highlighted in red, all records are shown and the filtering shows no effect at all.