Issues with tables and forms

I am having a number of issues using forms and tables. Before I list the issues, here is a screenshot of one of the tables and one of the forms.


Screenshot 2024-12-02 120619

As you can see in the screenshot, I have a button in the table that I am using to move a record from one table to another. When that button is clicked, I am running a query to move the record. I build the query using the GUI option. Here is a screenshot of that:

I then try to run a query that will delete the record from the original table.

DELETE
FROM tp_new_order_2024
WHERE id = {{ table4.selectedRow.id }}

I then try to refresh each table to show that the record has been moved.

The problems are:

  1. The record is not showing up in the new table
  2. The record is not being deleted from the original table
  3. When adding a record with the form, the form does not clear, despite having that option checked. It populates with a random record.

I am sure there is a better way to do this. If anyone has any suggestions on a better way or a way to fix what I am using, I would really appreciate it.

Hi Tom,

What you are trying to do makes sense and should be feasible with the process you had in mind here. When you run trigger the first query with the Move button do you see any errors pop up to the bottom right or in the debug menu?

Hey @tomm, just wanted to follow up and see if you were working on this.

Hi @Taylor_M,

I have discovered I wasn't always using the best option when running queries, especially as events when another query ran successfully. Finding that out, I went back and redid most of my queries and so far, I don't seem to be experiencing any more issues. Thanks for reaching out though.

2 Likes

Awesome! Glad you got it working with some refactoring