Ask Your Question

[Base]: Form Based Filter for Array Data Element [closed]

asked 2017-02-21 10:15:50 +0200

athrun_zala gravatar image


I'm using LibreOffice as front-end for a postgresql database and so far, everything is working great, except that I am unable to use Form Based Filter to filter for specific elements contained in an array field.

For example: Column A is filled with data that looks like {a,b,c,d,e,f}

Now I wish to filter all records whose Column A contains 'a' as an element of the Column A array.

Here's how I attempt to go about it:

  1. I click Form Based Filter and type in "IN ('a')" in the Column A field box
  2. I click on a different field to ensure the filter parameter is applied
  3. I click on apply filter.

The form gets stuck on the record I am on.

Form cannot display succeeding or preceding records.

It seems that the records were not filtered either.

The filter option buttons get greyed out.

I have to close the form to regain functionality.

Any help on how to go about filter array fields will be much appreciated.

thanks in advance!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by athrun_zala
close date 2017-03-02 00:53:45.545848

1 Answer

Sort by » oldest newest most voted

answered 2017-02-23 02:42:47 +0200

Ratslinger gravatar image

The first try at this was to use HSQLDB for the test. Created table & arrays OK but almost nothing else worked. Specific queries did work successfully.

Switched systems and used PostgreSQL to created table with array field. Set up form and had no success using filtering. Ran across mostly same problems as mentioned in the question. Also had many crashes.

Did have success creating my own filter. Created single record table to hold selection criteria. Used this in SQL selection criteria for main table (with Run SQL command directly turned on) using:

select, title, post, tags from posts, filter where tags[1] = filter.selection;

with tags[1] being the first position in the array.

Since Base is essentially set around HSQLDB v1.8 (no array capability), this may not be the only problem using array fields.

edit flag offensive delete link more


Thanks for the response!

I guess there is no going around turning to SQL commands.

athrun_zala gravatar imageathrun_zala ( 2017-03-02 00:52:54 +0200 )edit

Question Tools

1 follower


Asked: 2017-02-21 10:15:50 +0200

Seen: 159 times

Last updated: Feb 23 '17