[Solved] Base 4.1.2: using asterisk in subform data filters

Discuss the database features
Post Reply
eminkovitch
Posts: 14
Joined: Sun Feb 19, 2017 4:59 am

[Solved] Base 4.1.2: using asterisk in subform data filters

Post by eminkovitch »

Hi everyone, I have a question regarding the internal data filtering machanism, where you set up a search form with the search key and link a subform to the search form using the search key. This is a very powerful filtering mechanism that sets Base apart from its peers. However, you are limited to the data set returned by the search filter, and can't display all records any longer once the mechanism is activated. I tried all sorts of things, and can't figure it out. Can you use some clever ruse such as the '*' to override the filter? If yes how?

Many thanks,
Eliot
Last edited by Hagar Delest on Sun Mar 26, 2017 5:57 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.3 on Windows 8, Leonovo laptop with 5GB ram and 1Ghz dual-core processor
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: OO 4.1.2 Base: using * (asterisk) in subform data filter

Post by UnklDonald418 »

Look at:
viewtopic.php?f=100&t=42845
scroll down to the very bottom and download "LIKE_user_input_filter.odb "
If I understand your question that example may do what you want.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: OO 4.1.2 Base: using * (asterisk) in subform data filter

Post by Villeroy »

If I understand your question correctly, you want an option to realease the link between parent and subform.

Having a parent form with RowSet_A and a subform with RowSet_B linked through a common field X, you may try this:
Data source of RowSet_B (subform): SELECT "B".* FROM "B" WHERE ("B"."X"= :paramX) OR (:paramX IS NULL)
Then link the subform's paramX to the parent form's X.
When you now jump to very last row (new record) of RowSet_A (or any other record with an empty "A"."X") the right side of the OR condition becomes True for all records in RowSet_B.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
eminkovitch
Posts: 14
Joined: Sun Feb 19, 2017 4:59 am

Re: OO 4.1.2 Base: using * (asterisk) in subform data filter

Post by eminkovitch »

The parent is just a simple form with the search criteria on it. But yes, you are correct, the sub-form is linked to parent on the criteria field, and therefore the search filter is always on. Your suggestion looks promising, but where do I type that, because I use the interface for specifying Master and Slave fields?

Thank you
Eliot
OpenOffice 4.1.3 on Windows 8, Leonovo laptop with 5GB ram and 1Ghz dual-core processor
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: OO 4.1.2 Base: using * (asterisk) in subform data filter

Post by Villeroy »

Have a look at this one: download/file.php?id=30996
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
eminkovitch
Posts: 14
Joined: Sun Feb 19, 2017 4:59 am

Re: OO 4.1.2 Base: using * (asterisk) in subform data filter

Post by eminkovitch »

Thank you UnklDonald418 and Villeroy, both your answers are useful. The solution is in the selection statements, and I was looking in the master/slave field link.

Cheers!
Eliot
OpenOffice 4.1.3 on Windows 8, Leonovo laptop with 5GB ram and 1Ghz dual-core processor
Post Reply