# Problem in creating a detail record from master record

**URL:** https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084
**Category:** Ask for Help
**Created:** [August 6, 2021, 7:28am UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084 "2021-08-06T07:28:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Kamal\_K\_Jalan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kamal_k_jalan/32/29957_2.png) [@Kamal\_K\_Jalan](https://community.glideapps.com/u/Kamal_K_Jalan)
#### Post date: [August 6, 2021, 7:28am UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/1 "2021-08-06T07:28:59Z")

</div>

Hello Experts,

I have two sheet for this particular query of mine.

Sheet 1 - Lesson Plan [Subject | Topic | Array of Teacher mail]

Sheet 2 - Homework Assignment [Subject | Topic | Teacher | Initiated | Alloted Time]

In Table 1, I have various columns and one relationship array column which stores all the teachers mail id. For example: Row 1 will have following data

Lesson Plan [Maths, Triangle, Teacher1, Teacher2]

There is a tab based on Sheet 1 (Lesson Plan) and there is a button (open form) which take other field entries and upon clicking which will add row in Sheet 2 after asking certain more field value as describe above.

Now, I need 2 rows in sheet 2 (Homework Assignment).

How do i achieve this? Attaching screen shot with what i tried. But it is not working. Please Help!!

 ![Hw - Screen 3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8e14aea0f59083a58e64715857a91f63c39c2e3e.png)  
 ![Hw - Screen 2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/e/cededf58dd31f0792dc59767af1e08a8d3449e6c.png)  
 ![Hw - Screen 1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/b/abd8a39ccdf9250643636d01987e09c3b250432b.png)

---

<div class="post-metadata">

### Author: ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)
#### Post date: [August 6, 2021, 10:25am UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/2 "2021-08-06T10:25:38Z")

</div>

Hola @Kamal_K_Jalan

I am having trouble understanding:

What exactly do you need in Table 2?

---

<div class="post-metadata">

### Author: ![Kamal\_K\_Jalan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kamal_k_jalan/32/29957_2.png) [@Kamal\_K\_Jalan](https://community.glideapps.com/u/Kamal_K_Jalan)
#### Post date: [August 6, 2021, 11:03am UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/3 "2021-08-06T11:03:18Z")

</div>

Table2 is my Sheet2.

There is an relationship set up in my sheet 1 with some other table. For example, lets say that there are 3 values in that array field.

Now in my sheet 2, I will have 3 records each corresponding to one value of the array and it should not be duplicated.

Hope i am clear, if not request you to please have a 10 mins google meet session as per your time availability.

Regards

---

<div class="post-metadata">

### Author: ![Kamal\_K\_Jalan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kamal_k_jalan/32/29957_2.png) [@Kamal\_K\_Jalan](https://community.glideapps.com/u/Kamal_K_Jalan)
#### Post date: [August 6, 2021, 11:06am UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/4 "2021-08-06T11:06:09Z")

</div>

Just to mention,

I wrote the above sequence as per my attached image: What system does is it add rows in my Sheet2 once when user click “submit” and then it starts the sequence and goes to “else” section. Again next time, it does the same activity. This mat all the time the sequence takes the “else” route.

---

<div class="post-metadata">

### Author: ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)
#### Post date: [August 6, 2021, 12:41pm UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/5 "2021-08-06T12:41:57Z")

</div>

So you want to pass info from your table 1 to table 2 through the form, right?

To do so you can click on the + sign as in adding components and scroll down to screen columns.

This gives you access to the columns on your table 1, provided your form is in table 1, then you can add them to your table 2 through your form.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/9/a98b8b8d2cf72396e1779f2efe8bf7262ebd9262.jpeg)

I hope this helps.

---

<div class="post-metadata">

### Author: ![Kamal\_K\_Jalan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kamal_k_jalan/32/29957_2.png) [@Kamal\_K\_Jalan](https://community.glideapps.com/u/Kamal_K_Jalan)
#### Post date: [August 6, 2021, 1:41pm UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/6 "2021-08-06T13:41:03Z")

</div>

Thats ok and straight forward if I do not want to validate before adding rows. I guess if you dig a little deeper in my question.

I need to pass the values to Table 2 based on certain conditions and those conditions I want to check through the action sequence before adding the row.

Thats where I am facing issue.

---

<div class="post-metadata">

### Author: ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)
#### Post date: [August 6, 2021, 1:54pm UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/7 "2021-08-06T13:54:21Z")

</div>

Have you tried to use a custom form?

This way you can set better conditions to your actions as these will be set before sending the info to table 2.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

---

<div class="post-metadata">

### Author: ![Kamal\_K\_Jalan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kamal_k_jalan/32/29957_2.png) [@Kamal\_K\_Jalan](https://community.glideapps.com/u/Kamal_K_Jalan)
#### Post date: [August 8, 2021, 3:25am UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/8 "2021-08-08T03:25:07Z")

</div>

Thanks Santiago for helping me out. Based on your advice i did few changes and could achieve the result.

Basically, in your master table, you need to pull the user profile mail id and make a template column on the uniqueness between the two tables. Then make a relationship between master and detail table.  
While updating the records now, you can check the count status of relationship and take necessary action.

Thanks to [Robert Petitto] for helping me out through his videos.

---

<div class="post-metadata">

### Author: ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)
#### Post date: [January 17, 2024, 4:51pm UTC](https://community.glideapps.com/t/problem-in-creating-a-detail-record-from-master-record/30084/9 "2024-01-17T16:51:03Z")

</div>


