# How to write to 2 different sheets in one edit form?

**URL:** <https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280>\
**Category:** Ask for Help\
**Created:** [July 11, 2022, 12:41pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280 "2022-07-11T12:41:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 12:41pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/1 "2022-07-11T12:41:15Z")

</div>

If someone has an account that is not filled yet, I want them to both fill some fields in their user sheet (name, address) as some fields in the sheet of the product they are ordering. How do I do that? All in one form.

---

<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:** [July 11, 2022, 1:29pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/2 "2022-07-11T13:29:20Z")

</div>

Might need a little more context to provide the best answer, but essentially you’re probably going to need to do a Set Column Values via a Single Relation.

But, your question sets off a tiny red flag for me - are you adding/editing the same values in 2 different tables? If so, that seems like un-necessary redundancy. You might be better off just setting the values in one table, and then use a relation + lookup to access the data from the 2nd table. Hard to say, without seeing more.

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 1:34pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/3 "2022-07-11T13:34:11Z")

</div>

No, different values.  
I have a shop. The site is open to everyone.  
If people want to order something, I need info:  
A - Info about the user (where do you live, how can I connect you)  
B - Info about the product they order (size, collection date, etc)  
A and B go into different sheets.  
As a non-coder I ask myself why can’t I decide per component which sheet I write the info to?  
And now that doesnt seem possible, whats the best way to accomplish this 😉

---

<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:** [July 11, 2022, 1:43pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/4 "2022-07-11T13:43:48Z")

</div>

So are you adding new rows, or editing existing rows?

Sounds like you’re adding new rows, in which case the simple answer is to use an On Submit action which adds a row to your second table.

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 1:46pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/5 "2022-07-11T13:46:34Z")

</div>

Both 😉

> Editing existing row ( The User Profile is existing rows, because when signing up the user only has to add email.)  
> Add new row because the existing user buys a subscription.

---

<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:** [July 11, 2022, 1:47pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/6 "2022-07-11T13:47:38Z")

</div>

Okay. So just use an on submit action to add a row to the 2nd table.

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 1:50pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/7 "2022-07-11T13:50:19Z")

</div>

Yeah, that’s not the problem. That’s more or less default.  
But besides that I want the user to fill its profile that for starters only has email address because that what Glide asks when signing up…

To the user it won’t matter and feel logical: I ask to give some personal details (adress etc) and some product details (size, color).

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 1:56pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/8 "2022-07-11T13:56:16Z")

</div>

To me it would feel logical If a Glide admin could easily add required fields by choosing components to the user profile page. If that was the case, I would be done 😉

---

<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 11, 2022, 1:56pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/9 "2022-07-11T13:56:16Z")

</div>

You’re probably going to need to write those user values to the order table, and then you can use a set column action on submit to pass them to the user table. You will probably need a single relation from the order table to the user table to accomplish that.

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 1:59pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/10 "2022-07-11T13:59:09Z")

</div>

Thanks, If I start from the other side, I need that info like address, city, age, etc on the user sheet to be able to send and contact. What is the way to let people add that when signing up? Because they have to leave their email anyway, a few fields extra is no problem. If I have that, the rest is doable for me.

---

<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:** [July 11, 2022, 2:03pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/11 "2022-07-11T14:03:25Z")

</div>

You can create a simple onboarding screen that asks for that information. Set the visibility on that such that it only shows up when those User Profile values are empty.

---

<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 11, 2022, 2:09pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/12 "2022-07-11T14:09:19Z")

</div>

Or before they can even place an order show a button to complete their profile, which can take them to a profile edit screen. Once the profile is complete, only then show the button to place an order. Theat way theyr aren’t forced into completing their profile and can browse freely until they are ready to start ordering. Then the only way to start the order is to have a completed profile.

---

<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 11, 2022, 2:11pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/13 "2022-07-11T14:11:46Z")

</div>

It’s similar to what I do here. You can’t add anything to the cart until you sign in. I use the same button but with a custom action that forces you to sign in. Once signed in, then the button will allow you to add to cart.

I don’t remember, but I may have something in there to pass in details from the user profile, or let the user change them while completing their order. I don’t remember if I did anything to actually save updated values back to the user profile.

So my example may or may not contain pieces of both scenarios.

> [@Shopping Cart Concept for demonstration purposes](https://community.glideapps.com/t/shopping-cart-concept-for-demonstration-purposes/33264):
>
> First of all, I want to say that I’m personally not a big fan of ecommerce type apps with Glide. There’s a lot of complexity to them and everybody has a different view for how they should work. Because of that, I generally don’t give advice on how to do things with them. Glide has said that ecommerce is not the direction they are focused on and I think Glide is short on some logic and functionality to properly handle the purchase and inventory side of things. With that said, I still made an …

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 2:12pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/14 "2022-07-11T14:12:35Z")

</div>

The site is open for everyone, you need to sign up when you want to buy. Maybe I don’t understand Glide right, but it feels like one step too much?  
Say people want to buy. I will then send them to the sign-in / up page. And I will ask there for their email-address. Submit 1.  
After that, they get a code. With that code, they can log in.  
Of course, then I can ask them for more info. Submit 2.  
After Submit 2 they can order their product.

It feels like one submits too many? Every step too much is a chance of loosing people.

Is this what you mean? Do I need two steps or can I do with 1 but miss the point? 😉

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 2:13pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/15 "2022-07-11T14:13:59Z")

</div>

I’ll have a look! Thanks!

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 2:15pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/16 "2022-07-11T14:15:33Z")

</div>

I call it a shop, in a way it is, but in the end it is a subscription service where people have to pay for.

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 2:17pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/17 "2022-07-11T14:17:51Z")

</div>

Thanks @Jeff_Hager and @Darren_Murphy !  
I allways feel guilty asking questions and wasting peoples time.  
I am looking forward to Glide Support As A Service 😉

---

<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:** [July 11, 2022, 2:20pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/18 "2022-07-11T14:20:23Z")

</div>

That’s fine, I think Jeff & I both enjoy answering questions and helping folks.  
Quite often, the biggest challenge is getting a clear understanding of what the person is trying to do. Once we have that, the answer is usually pretty obvious 😉

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 11, 2022, 2:23pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/19 "2022-07-11T14:23:10Z")

</div>

But I’m serious about Glide As A Service too 😉 Often I don’t have questions, sometimes I have a lot, I would love to pay for a subscription service with answers when necessary. But then helping becomes a business of course 😉

---

<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 11, 2022, 2:35pm UTC](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280/20 "2022-07-11T14:35:11Z")

</div>

I’ve always said to myself that if I start using glide to make money, then it will no longer be fun and will become a commitment. What I use it for is largely personal. My primary “customer” is my girlfriend. 😉 Everything else I do I’d consider a hobby. I like helping out because it keeps me current on features and helps me learn new tricks. Right now I have no commitments to help anyone, so I can pick and choose based on my schedule.

[Next page](https://community.glideapps.com/t/how-to-write-to-2-different-sheets-in-one-edit-form/44280.md?page=2)
