#Table1.newRow is undefined

1 messages · Page 1 of 1 (latest)

old pythonBOT
#

To resolve the issue with "Table1.newRow is undefined," please follow these steps to ensure that the Table widget is correctly configured to allow adding new rows and that the newRow property is properly referenced:

  1. Enable Editable and Add New Row Properties:
  • Ensure that the Editable property is enabled for all the required columns in the Table widget.
  • Enable the Allow adding a row property in the Table widget's property pane. This will display a button labeled "Add new row" at the top of the Table widget.
  1. Verify the SQL Query:
  • Ensure that your SQL query correctly references the newRow properties. Here is your SQL query with the correct mustache syntax:

INSERT INTO public."departure_board" (
"route",
"created_at",
"date",
"departure_time",
"flight_number",
"id_departure_status_option",
"id_departure_passenger_action"
) VALUES (
{?{ Table1.newRow.route }?} ,
{?{ Table1.newRow.created_at }?} ,
{?{ Table1.newRow.date }?} ,
{?{ Table1.newRow.departure_time }?} ,
{?{ Table1.newRow.flight_number }?} ,
{?{ Table1.newRow.id_departure_status_option }?} ,
{?{ Table1.newRow.id_departure_passenger_action }?}
);

  1. Set the onSave Event:
  • Set the Table widget's onSave event to run the insert query. This ensures that when a new row is added and saved, the query is executed to insert the data into the database.
  1. Debugging:
  • Add a temporary Text widget to display the contents of Table1.newRow to verify that it contains the expected data. For example:

{?{ Table1.newRow }?}

By following these steps, you should be able to resolve the issue and successfully insert new rows into your database using the Table widget in Appsmith?7:3?source??7:3?source?.

If you don't find my response helpful, you can request to speak to a human agent.

quartz thunder
#

Still does not work.

quartz thunder
#

I would like to speak to a human agent

#

The question marks appear to be wrong in the AI response.

old pythonBOT
#

Someone from our team will reach out to you on this thread. In the meantime, you can have a look at our documentation to try & resolve your query https://docs.appsmith.com?utm=bot

Organizations build internal applications such as dashboards, database GUIs, admin panels, approval apps, customer support tools, etc. to help improve their business operations. Appsmith is an open-source developer tool that enables the rapid development of these applications. You can drag and drop pre-built widgets to build UI. Connect securely...

old pythonBOT
#

Hello! I'm Amelia with Appsmith Support. ?

Please share the following information to help us debug this issue:

  1. What is your Appsmith version?
  2. Have you enabled the Allow adding a new row in the Table widget's properties?
  3. Send us a loom.com screen recording showing your implementation and the issue you get.