[Base] Add an editable, unbound column to a grid-control

Hi there,
I have two tables in my database (hsqldb), one for books and one containing genres to categorize theese books. (Both connected via a foreign key)

I want to create a Form, where I can select multiple books from a gridcontrol for further processing. The selection should be marked with a checkbox within each row of a book-entry.

The most simple solution is to add a persistent boolean column to my books-table, and then add a bound checkbox column to the GUI, but this is unnecessary, because I just need the selection-values temporarily in my form until it is closed.

1st Try:
I tried to add a checkbox without binding it to a database-field (I kept the “data field” value in the property-dialog empty).
→ Problem: No checkboxes are displayed in the grid-column.

2nd Try:
I bound the formular to a query instead of the books-table directly. The query just creates a dummy-column:

SELECT b.*, false AS "Selected" FROM "books" b;

The checkbox-column is bound to the dummy-column.
→ Problem: Checkboxes are displayed and editable but an exception is thrown when moving focus out of the checkbox (SQL-state HY00)

Does someone have a good solution for this?
Thanks in advance. :slight_smile:

Adding a column to your “books” table is most likely the easiest way. Filtering is another way but the number of records selected is not a controllable situation. Finally there is using macros. This, however, requires some tedious coding - especially when dealing with table grids.