Ask Your Question

BASE - Form Filter on Subform

asked 2017-03-30 19:36:06 +0200

Justin100 gravatar image

Hello! Using LibreOffice Base form based filters, is it possible to search a subform in order to find the matching related records? For example, a db with two related tables: Contacts and PhoneNrs, with PhoneNrs being in the subform. I would like to use the included, on the bottom of the page form based filter, to quickly find all matching contacts having a certain area code. I can easily do this with a query, but my question is doing this with the included form filter. I was unsuccessful doing this with both HSQL embedded and using PostgreSQL. All suggestions and comments welcome! Thanks!!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-03-30 21:39:35 +0200

Ratslinger gravatar image

updated 2017-03-30 23:23:15 +0200

Yes you can but I'm going to guess it's not what you actually want.

Since the subform is tied to the form, it only displays records based upon the record pointed to by the form record chosen. Therefore, if form is pointing to Contact "A" your filter will reveal only those PhoneNrs records in specified area code for company "A". It a guess that you are looking for ANY PhoneNrs with a specific area code. This would require filtering on a display of all records in PhoneNrs>

Here is a sample of filtering on a subform:

Filter to be Applied

image description

Result when filter applied:

image description

In this sample there are more records in "RPG" than the one displayed and other records contain "another" which are in different "GameCategory"'s.


You can simply add another form to the existing one using "PhoneNrs". Using my same example here is simple design (sorry threw together quickly):

image description

Then using the Filter:

image description

Produces this result:

image description

It all depends on how you set up your "Forms" and just what you want to see.

If this answers your question please click on the ✔ (upper left area of answer).

edit flag offensive delete link more


Then to use a form based filter to find a phone number or number pattern matching a contact I would have to create a new form based on phone numbers with my contacts as a subform. Is this correct? It does work, however I then have two forms to work with. Otherwise the other option is to use a form that is based on a query instead of a table, correct? Thanks @Ratslinger !

Justin100 gravatar imageJustin100 ( 2017-03-30 22:08:43 +0200 )edit

Please see edited area of answer.

Ratslinger gravatar imageRatslinger ( 2017-03-30 23:20:30 +0200 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-03-30 19:36:06 +0200

Seen: 676 times

Last updated: Mar 30 '17