# Handling dependencies

**URL:** <https://community.glideapps.com/t/handling-dependencies/12941>\
**Category:** Ask for Help\
**Created:** [July 22, 2020, 6:24pm UTC](https://community.glideapps.com/t/handling-dependencies/12941 "2020-07-22T18:24:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adelhammoud](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adelhammoud/32/5587_2.png) [@adelhammoud](https://community.glideapps.com/u/adelhammoud)\
**Post date:** [July 22, 2020, 6:24pm UTC](https://community.glideapps.com/t/handling-dependencies/12941/1 "2020-07-22T18:24:59Z")

</div>

My case bellow could be a small question or a big issue:

- I add a Company via a form and such data is stored in GS sheet=Companies
- Within Company’s record (once created of course), I have another form to “Add Contact” to add contacts associated with Companies - and such data will be stored in GS Sheet=Contacts
- The “Add Contact” form automatically takes Company name and fill Column=Comapny in the Contact tab.

If I change company name (from App), this change doesn’t automatically get updated in the Contact tab!!!

This is one example out of many other dependencies in the App, such as:  
Customer \>\> Agreement \>\> Invoice \>\> Payment  
Supplier \>\> Purchase Order \>\> Bill \>\> Payment  
And so on…

And I hope the answer won’t be "Use google script to do global tagging, find & replace 🙂 )

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 22, 2020, 7:13pm UTC](https://community.glideapps.com/t/handling-dependencies/12941/2 "2020-07-22T19:13:35Z")

</div>

I have recently changed my app to use RowID and actually pass the RowID in the form. So in your case, you would pass the company RowID instead of company name into the contacts sheet. This allows for the name to change since RowID would be static. You could also do this with Unique ID if you chose. You can then use relations and lookups to pull in the company name from the ID.

---

<div class="post-metadata">

**Author:** ![adelhammoud](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adelhammoud/32/5587_2.png) [@adelhammoud](https://community.glideapps.com/u/adelhammoud)\
**Post date:** [July 23, 2020, 8:10am UTC](https://community.glideapps.com/t/handling-dependencies/12941/3 "2020-07-23T08:10:34Z")

</div>

Thanks Jeff

App is now much reliable with your recommendation.  
It wasn’t easy to rework App pointing records to Row\_Id, but this is indeed the necessary evil.

---

<div class="post-metadata">

**Author:** ![Ulysse](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ulysse/32/15504_2.png) [@Ulysse](https://community.glideapps.com/u/Ulysse)\
**Post date:** [October 21, 2020, 7:39pm UTC](https://community.glideapps.com/t/handling-dependencies/12941/4 "2020-10-21T19:39:37Z")

</div>

Hi @Jeff_Hager  
+1 for using ID instead of display names for relations.

Wondering how would you do the reverse, meaning

- have an existing Contact resource
- whithin the edit page of that contact, have an “add a company” button form

**Previsouly** , it was possible to put `company.rowID` into `contact.companyID` because in the form we had a Screen Column “rowID” that gives us the company’s rowID.

But in this case the case the Screen Column component will give us the contact’s rowID, and we need the company’s rowID. How can we make glide copy the newly generated company’s rowID into the contact’s `companyID` ?

---

<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 22, 2020, 3:53am UTC](https://community.glideapps.com/t/handling-dependencies/12941/5 "2020-10-22T03:53:05Z")

</div>

Do you create new rows for each of this, I think you can use a choice component, point to the companies sheet, display the name at the front end and write the row ID in the back end. Would it work, or am I missing something?
