Created attachment 113570 [details]
Show where to integrate the SQL-Code in general properties of a push-button.
For many little SQL-tasks in LO-Base you need to execute a macro. It would be a good enhancement to get this possibility directly in a push-button without any knowledge of tricky macros.
1) Many people use separate filter-tables to search for the right data in subforms. The fields in the tables should be set to NULL for showing all data. You could delete the content in every field, save the form and refresh the other form. Better you will set
UPDATE "Filter" SET "F_1" = NULL;
UPDATE "Filter" SET "F_2" = NULL;
UPDATE "Filter" SET "F_3" = NULL;
UPDATE "Filter" SET "F_4" = NULL
and refresh the other form - all by pressing one push-button.
2) All content of a table, which is older than 100 days, should be deleted:
DELETE FROM TABLE "TABLE1" WHERE DATEDIFF ('dd', DATUM,CURRENT_DATE) > 100
You could add the code every time directly to Tools → SQL and have to remember every time. You could add this code to a macro. Or you would add this code to a push-button and it would be executed there.
It would be great to get a possibility to save SQL-code in a button and to execute this code if it is needed.
There should be added a field for SQL-native and also an Action "Execute SQL → Refresh Form".
This feature would be a great improvement
Another example would be
INSERT INTO TABLE1 (V1,V2,V3)(SELECT F1,F2,F3 FROM TABLE_DEFAULTS WHERE ID = 0) to set pre-adjustable default values into a new record.