Page 1 of 1

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

PostPosted: Sat Mar 25, 2017 4:01 pm
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

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

PostPosted: Sun Mar 26, 2017 1:34 am
by UnklDonald418
Look at:
https://forum.openoffice.org/en/forum/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.

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

PostPosted: Sun Mar 26, 2017 10:37 am
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.

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

PostPosted: Sun Mar 26, 2017 2:44 pm
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

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

PostPosted: Sun Mar 26, 2017 3:38 pm
by Villeroy

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

PostPosted: Sun Mar 26, 2017 4:06 pm
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