Starting a Form

I think I have tables figured out. Now I am starting on Forms.
The documentation seems to be oriented to building a table first, then using a Form for editing.
I am trying to build a Form for adding a record to a table without presenting the table.
But I can't seem to connect the table to the form. I have tried updating the table in the Data component of the form but that has no effect. I would like to add a new row to the table and connect the form fields to that row table.
Is it possible to do this?

Upon submit of the form, insert a new record to the database and then reload the query that retrieves the data for the table?

My problem is there is no default value for the fields on the form to show where the data should be saved.
I cannot assign a default field name because there is no associated table.

Maybe I misread what you are trying to do.
Can you share some screenshots?

Here is a screen shot. Its a modal form. I have not figured out how to link it to a table.

Do you want the selected row of the table to populate the fields of the form?

Yes, that would be fine.
What is missing is a connection to a table.

OK so for each field, Default value should be like the following:

Here's the default field

Under the submit button, I have:
select * from company

The {{table4.recordUpdates}}, does not work.
Elsewhere I have connected table4 back to the MySQL File Company.
Nothing goes back to Company.


Hopping in here to try helping as well!

Could you share a screenshot of the query that your submit button is running?

The recordUpdates property gets populated with any changed rows on the table. It’s an array of objects, where each object represents an array.

Generally, we would run an update query that passes in recordUpdates then add an additional get query (e.g. SELECT * FROM users) on success of that update query!

I am attaching 4 screen shots.

  1. This shows the form and the table as they appear.
  2. This is the code that links the form to the table. When it first initiates, the form data equals the table data. But updates in the table do you show on the form and vice versa.
  3. Under the Submit button I have code under "OnUpdateRowCust3" which is "TableUpdate".
  4. That same code also has success code that restores the data from the server.

I think the problem is that there is no link between the form and the table.


{{}}. Remove the ? and the ternary it is not needed

I tried that and got an error message that
"data was required".
Do you mean remove all the question marks or just some of them?

Why not make each column in the table editable and then use the table4.recordUpdates in the GUI mode of the query when you are trying to update the records in the table4 component. You don't need the form.

There are 14 columns in the company table and some fields are pretty wide. It is not practical to fill this out in table format.

What does this look like: {{}} perhaps it should be
If you could share the data from the table that would help me help you more effectively.

I tried this. First it causes an error message at the entry point. (see screen shot below)
And when I tried to run it, there is no link to the table.

Looking at your last screenshot, I believe you have curly brackets around the 0 instead of hard brackets!


when it should be...


Does that make a difference at all?

The code that works best for the form connection to the table is shown in the first screen shot. There is no [0]. The form behaves properly and shows whatever is in the selected table row. So I think I am OK there.
The bigger problem is the code under the Submit button. After some delving around I have come up with the code in the next 4 screen shots. It seems like code that should work but it doesn't work. i.e. the selected row of the table does not update with what is on the form.
There is no success event code. Not sure if there should be.

That also looks good to me on initial glance! It’s not updating in your db? There should be some indicator of success. Are you getting an error message when running this query?