I’ve created a database (embedded Firebase) with two tables, entries and filterEntries, and a search form with filterEntries as its main form. Now I’m looking for a way to have a button clear the filterEntries row (set NULLs for its columns), but ideally without using a macro (for easier/safer sharing). Essentially I just need the button to do UPDATE filterEntries SET "filterEntry" = NULL
and refresh the form. I thought maybe I could do this by evaluating a SQL command, but that gives The given command is not a SELECT statement. Only queries are allowed
. What’s the normal / best way to do this in LibreOffice Base?
Hello,
Without macros and depending on your constructed form, have used a list box for record selection and a button to refresh the form with the choice. In the list box the first line is blank. If selected this places the NULL in the filter table field & this can be used by the query.
Sample ------- BikeFilterAllOrOne.odb
Thanks for taking a look at this! I’ve added a simplified example of my setup. My search fields are free text fields, and I’d like one button to clear all of them. Not sure if your solution here can be translated for such a configuration?
Again in keeping away from macros, you could add another selection - a check box attached to the filter table. If on SQL selects all. If off SQL uses selected entries.
Probably more ways of approaching this.