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

**URL:** <https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170>\
**Category:** Ask for Help\
**Created:** [June 1, 2025, 5:19am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170 "2025-06-01T05:19:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjaykumar\_kushwaha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanjaykumar_kushwaha/32/88706_2.png) [@Sanjaykumar\_kushwaha](https://community.glideapps.com/u/Sanjaykumar_kushwaha)\
**Post date:** [June 1, 2025, 5:19am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170/1 "2025-06-01T05:19:12Z")

</div>

“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!

 ![1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2d44809387d82566693420ff46f4b183aff8f989.jpeg)  
 ![2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/2/a2e87537741984897cd4284ee0fa5fc7e6d5d7d7.jpeg)  
 ![3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/28c5b4f294f56ad21b3023da0973a25186e87283.jpeg)  
 ![4](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/7/c7444d8e28a2020d9b4453bb2874f396f0b97056.jpeg)  
 ![5](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2ddb2eed5e05e325e269d65ff9f8485b295ad77e.jpeg)  
 ![6](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/9/b9164922ec4dbc34736b3494b4a160a32ab053cf.jpeg)  
 ![7](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2f7b0abb091a4563852754dc079f56ed9a5db016.jpeg)  
 ![8](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/2/321450bcd5b10dede6ff54daa146abb72d8efdb5.jpeg)  
 ![9](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/84b57ef94868a003869ff5d979893edc9b5e520b.jpeg)  
 ![10](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/611edd4686d4cf707af45677638fd4c95e5ebc86.jpeg)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 1, 2025, 6:01am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170/2 "2025-06-01T06:01:07Z")

</div>

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.

> **[Show Form Screen | Glide Docs](https://www.glideapps.com/docs/automation/actions/show-form-screen)**
>
> Show a form screen for the user.

---

<div class="post-metadata">

**Author:** ![Sanjaykumar\_kushwaha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanjaykumar_kushwaha/32/88706_2.png) [@Sanjaykumar\_kushwaha](https://community.glideapps.com/u/Sanjaykumar_kushwaha)\
**Post date:** [June 1, 2025, 6:13am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170/3 "2025-06-01T06:13:30Z")

</div>

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.

 ![1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2d44809387d82566693420ff46f4b183aff8f989.jpeg)  
 ![3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/28c5b4f294f56ad21b3023da0973a25186e87283.jpeg)  
 ![5](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2ddb2eed5e05e325e269d65ff9f8485b295ad77e.jpeg)  
 ![6](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/9/b9164922ec4dbc34736b3494b4a160a32ab053cf.jpeg)  
 ![7](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2f7b0abb091a4563852754dc079f56ed9a5db016.jpeg)  
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.

---

<div class="post-metadata">

**Author:** ![Mazen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mazen/32/84042_2.png) [@Mazen](https://community.glideapps.com/u/Mazen)\
**Post date:** [June 1, 2025, 8:09am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170/4 "2025-06-01T08:09:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 1, 2025, 8:22am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170/5 "2025-06-01T08:22:32Z")

</div>

> [@Sanjaykumar\_kushwaha](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 2, 2025, 9:37am UTC](https://community.glideapps.com/t/add-row-action-updates-oldest-row-and-adds-new-row-input-fields-not-clearing/82170/6 "2025-06-02T09:37:17Z")

</div>

2 posts were merged into an existing topic: [Help Needed: “Generate Image” (OpenAI DALL-E) Action Fails with Dynamic Prompt, Works with Static Text](https://community.glideapps.com/t/help-needed-generate-image-openai-dall-e-action-fails-with-dynamic-prompt-works-with-static-text/82187/2)
