"Add Row" Action Updates Oldest Row AND Adds New Row; Input Fields Not Clearing

“Add Row” Action Updates Oldest Row AND Adds New Row; Input Fields Not Clearing

Hello Glide Community,

I need help with a custom button action that’s causing two problems:

  1. Data Overwriting/Duplication: When I submit my “Find Your Perfect Meal” form (see Screenshot of Form - 13.jpg showing inputs like “Chicken, potato, rice”), my Add row action in the button sequence:
  • Incorrectly updates the oldest existing row in my AI Recipe Request table with the new form data.
  • Also, correctly adds a new row with the new form data.
  • This results in the oldest recipe in my list changing to the newest one, and a new entry for the newest one also appearing. (See Screenshot of Data Table - 11.jpg & 12.jpg, showing 3 rows where row 1 and row 3 are identical after submitting “Chicken, potato, rice” when “Mushroom, rice” was previously row 1).
  1. Input Fields Not Resetting: After submitting the form, the input fields on my “Find Your Perfect Meal” form do not clear automatically. They retain the values from the last submission.

My Setup:

  • Form Screen (“Find Your Perfect Meal”): Users input ingredients and preferences.
  • Data Table (AI Recipe Request): Stores these inputs and subsequent AI-generated recipe details (name, ingredients, instructions, image).
  • “Generate Recipe” Button Actions (Screenshot 13.jpg):
    1. Add row to AI Recipe Request table (mapping form inputs, UserID, Timestamp).
    2. Generate image (using OpenAI DALL-E, saves to an image column in AI Recipe Request).
    3. Go to tab “Find Recipes” screen (this screen lists recipes from the AI Recipe Request table).

What I’ve Tried (with AI assistance):

  • Meticulously checking the data mapping in the Add row action to ensure only new data is mapped and no Row ID is being referenced.
  • Deleting and cleanly rebuilding the Add row action.
  • Attempting to add a Set column values action at the end of the button sequence to clear form fields, but it seemed to have issues with context (“This item”).

My Questions:

  1. Why is my Add row action causing both an update to the oldest row and the addition of a new row? How can I ensure it only adds a new row?
  2. What is the correct and simplest way to clear the form input fields on the “Find Your Perfect Meal” screen after the actions have run?

I would be grateful for any insights. I can provide a read-only link to my app.

Thank you!










That’s not a form. It’s a details screen with some input components added. As soon as you type something in any of those, the data in the columns you have pointed them at will be immediately be updated.

You should use an actual form screen.

2 Likes

thank you for your reply sir.
When i add row every time, new row is added in data editor which is fine, but the problem is first row is always changed according to and similar to newly added row.






I have shared you some screenshots to identify my problem. As you can see in the first image, there is one row in the data and second image shows the layout for that data. but when i input some details (like in 3rd image and click to action button that adds row to the data), you can see two recipes with similar name in 4th image (the 1st recipe is automatically changed0. Now, when you see in data editor, there is new row added at the bottom , but the problem is first row is automatically changed and updated after adding new row.
so, my add row action is malfunctioning. when i add row every time, new row is added in data editor which is fine, but the problem is first row is always changed according to and similar to newly added row.
it would be great help, if you can solve this problem and guide me in best way. thank you.

The form submit button adds a row u dont need to add a row inside the workflow, if u needed the action in the workflow then add a condition to check if any cell is empty then add row else empty

I told you why it is happening. It’s because you are not using a proper form.
Please refer to the documentation link that I gave you earlier.

2 posts were merged into an existing topic: Help Needed: “Generate Image” (OpenAI DALL-E) Action Fails with Dynamic Prompt, Works with Static Text