# Form problems - (edit other table)

**URL:** <https://community.glideapps.com/t/form-problems-edit-other-table/77315>\
**Category:** Ask for Help\
**Created:** [October 24, 2024, 9:11pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315 "2024-10-24T21:11:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riccardo\_Berna](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/riccardo_berna/32/81084_2.png) [@Riccardo\_Berna](https://community.glideapps.com/u/Riccardo_Berna)\
**Post date:** [October 24, 2024, 9:11pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/1 "2024-10-24T21:11:30Z")

</div>

Hi,  
my purpose is to create a report that has:  
-info such as client name, date, description…  
-1 or more articles (each article has a code, a name and a cost)

I have 2 table, one for the “Report” and one for the “Articles”. In the “Report” table there is a relation column that link all the articles with the corrispondent report through the expected\_report\_number (calcoleted by latest report number + 1).

I create a screen based on “Report” table with a collection list where there is a button to add new report.

 ![2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/8/c8600a294d2b8e4cc9e8cc223e6c4d0565b9b036.png)  
In the report form screen I added a collection list where I can see all the article related with this report I’m creating and through the “add” button I can add a new article if I need.  
 ![3.PNG](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/1/b10c17ee648feef1c8d3d9053174b23c6295c1a3.jpeg)

The problem is that if I’m creating a new report (for ex report 5), I add an article for this report (article will be related to report 5), and than I cancel the report form beacuse I don’t need anymore, the next time I want to create a new report I will found that article that I created before in the new form (form for the report 5 that last time I cencelled).

I was thinking to add an action to the first “add” button: before starting when I open the report form I add an action that delete all the old Article row that aren’t linked to a report. But the “add” button for the report doesn’t allow me to delete row in article table (only report).

How can I do?

TY

---

<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:** [October 25, 2024, 12:38am UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/2 "2024-10-25T00:38:10Z")

</div>

> [@Riccardo\_Berna](#):
>
> I have 2 table, one for the “Report” and one for the “Articles”. In the “Report” table there is a relation column that link all the articles with the corrispondent report through the expected\_report\_number (calcoleted by latest report number + 1).

Sounds like you need to approach it a bit different:

- On entry to the form, set a column in your user profiles to have a unique ID value.
- Use that unique ID value to add to the Articles table, served as the “Report ID”.
- Submit that ID to your Report table once you’re doing adding other info.

By that, you’re not relying on the report number anymore, which sounds like it was causing problems. Then combine that with your idea here on entry to the form.

> [@Riccardo\_Berna](#):
>
> I was thinking to add an action to the first “add” button: before starting when I open the report form I add an action that delete all the old Article row that aren’t linked to a report. But the “add” button for the report doesn’t allow me to delete row in article table (only report).

---

<div class="post-metadata">

**Author:** ![Riccardo\_Berna](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/riccardo_berna/32/81084_2.png) [@Riccardo\_Berna](https://community.glideapps.com/u/Riccardo_Berna)\
**Post date:** [October 26, 2024, 6:09pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/3 "2024-10-26T18:09:08Z")

</div>

Thank you for your time.

I partially solved the problem: using unique ID value I don’t see past articles created in report that has been deleted.  
But this “ghost” articles that aren’t linked to any report remain on the Articles table. I can show only the articles that is linked to a report but I would like to know if there is a way to delete the articles table’s row that aren’t linked.

Opening a new form from report screen I can’t see Articles Table, so I try do to this in the sub-form to create new articles. In this way the ghost articles remain until I create and submit a new article. But doesn’t work.

 ![Catturasssssssssss](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/e/2eeb2c59cdcd7cd15917ebe15e408a6d7adc43fc.png)

New column is a relation column that is linked to the report table, so the articles that is on a report has a link, and the articles that i’m working with has the Id that is the user Id created.

What’s wrong?

TY

---

<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:** [October 26, 2024, 11:26pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/4 "2024-10-26T23:26:47Z")

</div>

> [@Riccardo\_Berna](#):
>
> But this “ghost” articles that aren’t linked to any report remain on the Articles table. I can show only the articles that is linked to a report but I would like to know if there is a way to delete the articles table’s row that aren’t linked.

If you’re the only one adding these, then:

- Add a query in the user profiles table, query all articles that have a unique ID, but the relation to the “Report” table is empty (meaning “ghost” articles).
- Delete them through the query before entering your form.

---

<div class="post-metadata">

**Author:** ![Riccardo\_Berna](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/riccardo_berna/32/81084_2.png) [@Riccardo\_Berna](https://community.glideapps.com/u/Riccardo_Berna)\
**Post date:** [October 27, 2024, 1:26pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/5 "2024-10-27T13:26:51Z")

</div>

Thank you, It works!

I think it works also if I’m not the only one to add an articles, because query column look for the relation and not to the used id.

In any case the problem is solved.

---

<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:** [October 27, 2024, 10:57pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/6 "2024-10-27T22:57:25Z")

</div>

> [@Riccardo\_Berna](#):
>
> I think it works also if I’m not the only one to add an articles, because query column look for the relation and not to the used id.

Yeah in that case your query should filter by the signed-in user’s ID as well, just in case 2+ of you are adding at the same time and you accidentally delete another user’s articles.

---

<div class="post-metadata">

**Author:** ![Riccardo\_Berna](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/riccardo_berna/32/81084_2.png) [@Riccardo\_Berna](https://community.glideapps.com/u/Riccardo_Berna)\
**Post date:** [October 28, 2024, 12:38pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/7 "2024-10-28T12:38:56Z")

</div>

Thank you for your time

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 4, 2024, 12:39pm UTC](https://community.glideapps.com/t/form-problems-edit-other-table/77315/8 "2024-11-04T12:39:46Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
