# Associating data with new rows

**URL:** <https://community.glideapps.com/t/associating-data-with-new-rows/29506>\
**Category:** Ask for Help\
**Created:** [July 24, 2021, 7:38pm UTC](https://community.glideapps.com/t/associating-data-with-new-rows/29506 "2021-07-24T19:38:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chad](https://community.glideapps.com/u/Chad)\
**Post date:** [July 24, 2021, 7:38pm UTC](https://community.glideapps.com/t/associating-data-with-new-rows/29506/1 "2021-07-24T19:38:33Z")

</div>

I’m absolutely stumped and would welcome any help.

I have a sheet (“Groups”) that collects data (from a Glide Form) about groups that meets every week for X weeks. So, the “Group” sheet gathers things like (a) the name of the group, (b) the day it meets, (c) the time it meets, etc.

Each of those groups needs to be associated with certain weeks on the “Weeks” sheet. That sheet keeps track of unique data for each week (e.g., description of the week, week number, etc.). Also, the Weeks sheet is dynamically updated. So, it is important that the Groups be associated with the Weeks that are active at the time the Group is created.

I need each Group, when created from the form, to be associated with certain, (currently “active”) weeks on the “Weeks” sheet.

Ideally, this would create an additional sheet with two columns (“GroupID” and “WeekID”) and would have an entry for every week that Group is associated with. However, I’ve been unable to figure out to add, say, 15 new entries to the sheet to represent the 15 weeks that Group is associated with. Ideally, with each new Group, it would add entries like

1. Group1ID, Week1ID
2. Group1ID, Week2ID
3. Group1ID, Week3ID  
etc.

Is there a way to write these rows to the sheet? Or is there a better way to associate these weeks (which are sourced from a dynamically updated sheet) with each Group?

Can anyone help?

---

<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:** [July 25, 2021, 9:14am UTC](https://community.glideapps.com/t/associating-data-with-new-rows/29506/2 "2021-07-25T09:14:00Z")

</div>

So when you add a new group you want to add 15 rows that are associated with that group, each representing 1 week.

---

<div class="post-metadata">

**Author:** ![Chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chad](https://community.glideapps.com/u/Chad)\
**Post date:** [July 25, 2021, 12:53pm UTC](https://community.glideapps.com/t/associating-data-with-new-rows/29506/3 "2021-07-25T12:53:31Z")

</div>

Yes. Right now, I haven’t been able to think of another way to do it.

I can’t simply associate the Group with the Weeks because the Weeks will dynamically update. But I need to preserve the historical record of which Weeks each Group is associated with. So I need a table that preserves those associations.

Is there a better way to do this?

Thanks for any help or insight you can provide.
