# Delivery App - Retrieving Order

**URL:** <https://community.glideapps.com/t/delivery-app-retrieving-order/7867>\
**Category:** Ask for Help\
**Created:** [April 26, 2020, 11:06am UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867 "2020-04-26T11:06:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 26, 2020, 11:06am UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/1 "2020-04-26T11:06:33Z")

</div>

_All the link in this post are screenshot describing my issue since I’m a new user and can’t post more than 1 image_

Hello,  
I’m having some issues setting this properly.

**Couple of words about the app i’m trying to do:**  
I’m recreating a food delivery app with multiple restaurants.  
Here is the [main sheet for all my restaurant](https://drive.google.com/open?id=1nJe0ab1-U-S5B8mg3RGrTanvQQGniiEv):

As you can see there is a relation column for the menu that fetch datas from this [other huge sheet with all restaurant’s dishes.](https://drive.google.com/open?id=13XX7v5fAQqmjjtxDSg9nFPPen5DmVLv_)

**The issue**  
So when it’s time to make orders i follow this procedure:

1. [Select the restaurant from homepage](https://drive.google.com/open?id=1QWC4ImOvNFnrA4som6nx9GiMVFM6cIvv)
2. [Browse the menu](https://drive.google.com/open?id=1H9g4sWXSf3gaAJHhpy6-LN55s2C-hhJg) and [select the food](https://drive.google.com/open?id=1bufTm3R6-wrjU10-pdky-YjqO5RyJx1t) i wish to order
3. [Select the quantity and submit](https://drive.google.com/open?id=1qUfABeDW3-aSZb3YWugGdnvH2EIA6t3g)

I’ve then recreated a [Custom Cart Tab](https://drive.google.com/open?id=1FSelIDo7-7dvQ3n-RaZnzmdrMrB8NWfR) that takes all the items i add (if the users is signed in and the Quantity is not 0).

The Custom Cart relies on [this sheet “Form Response”](https://drive.google.com/open?id=13drXG_RaIPIvB5h15MR0S54Twea-IW-d).  
Whenever i select a new item and add a quantity, the sheet get populated and the items get added to the Custom Cart tab.

**What I would like to achieve**  
Whenever a user click on “Submit Order” will have to fill [this form](https://drive.google.com/open?id=1yoWiTyIXFsv1tNnsErgclHdLuDqFyAES) with some personal data.  
He just need to tell us where he live, his real name and phone number.

I would like to collect all the upcoming orders into a [new Sheet called “Order”](https://drive.google.com/open?id=1b-bwXOc6bLV4D_g0wJlNs2-cJ2opDJYn).  
I would like every row gets populated with all user’s personal information and the list of items he ordered, the quantity and the total price.

I’ve already prepared an “Order” Sheet but what i can get is just his personal information.  
I don’t know how to fetch all the different dishes the user ordered because they sits on different rows right now.

Plus, I would like that the columns “Is Fulfilled” gets checked so I can initialise the user Custom Cart.

Thanks!

---

<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:** [April 26, 2020, 2:12pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/2 "2020-04-26T14:12:08Z")

</div>

There are several food related apps in the forum if you’re looking for ideas.

Here’s one idea that I wrote about yesterday.

> [@How to create an app for taking Sales Orders](https://community.glideapps.com/t/how-to-create-an-app-for-taking-sales-orders/7048/12):
>
> Here’s a bit of a wild idea. Create a column in your confirmed orders sheet that will contain only email and business. This can be 2 separate column joined with a template, or you can write it to the sheet later already joined from the form button. Doesn’t matter. We just need email and buiness only. Next on your products, sheet follow the instructions here to get a lookup column of the user’s signed in email into the products sheet. [List Relation "Data"](https://community.glideapps.com/t/list-relation-data/7659/5) Next in the products sheet, create…

Another restaurant app posted about yesterday.

> [@\[UPDATED\] Buffalo Burger hamburger](https://community.glideapps.com/t/buffalo-burger-crushing-your-hunger/7790):
>
> Hey All wave:t3Features updated: Deleted all sheet formulas and substituted on Data! (That’s dope) So that, thanks @Jeff_Hager tips, I was using and Arrayformula to creat my sales order ID. Now, everything on Data (That’s licky) Last, I deleted one tab which was doubling the number of orders rows. Again with formulas. Deleted completely. (Yeah, Glide’s power) Update Benefits: Less 50% orders rows App’s Speed: summoned to participate in Fast and Furious Hungry? Starving? Take a look i…

There are several restaurant and covid related apps you can find here.

> [@Please share your COVID-19 apps](https://community.glideapps.com/t/please-share-your-covid-19-apps/6032):
>
> Have you made an emergency app to help others during the COVID-19 crisis? We’d like to create a catalog of these apps. Please add yours here: [https://covid-apps.glideapp.io](https://covid-apps.glideapp.io)

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 26, 2020, 4:20pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/3 "2020-04-26T16:20:15Z")

</div>

I didn’t find a proper solution for my issue… the Buffalo Burger case seems pretty close but he only have one restaurant…

---

<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:** [April 26, 2020, 4:25pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/4 "2020-04-26T16:25:36Z")

</div>

If you read though the first link I posted. He is working on orders for multiple businesses.

---

<div class="post-metadata">

**Author:** ![Mariano\_Betta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mariano_betta/32/17895_2.png) [@Mariano\_Betta](https://community.glideapps.com/u/Mariano_Betta)\
**Post date:** [April 27, 2020, 12:57am UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/5 "2020-04-27T00:57:05Z")

</div>

1041/5000

Hello, what you want to do at this time would not know how, because when you send the order you only fill one row of data and you have the orders in different rows.  
If it serves you and your intention is to relate the ordered items, it can do something like this.

On the sheet where the articles are, enter an email & restaurant column and another email & restaurant & count column.  
That count would be comparing the electronic & restaurant column with a similar column in that final “Order” table. It can also be done by relating, there are several ways. Then it increases from 1.  
When ordering an item, together send those 2 columns to the cart (the user does not need to see them, hidden). And then from the cart when you send the order to that “Order” sheet, incorporate those 2 columns.  
The email & restaurant column will help you count.  
The email & restaurant & count column helps you link items to the final order.  
I hope it is understood.  
Jeff\_Hager is the one who helped me.

> [@How to create an app for taking Sales Orders](https://community.glideapps.com/t/how-to-create-an-app-for-taking-sales-orders/7048/12):
>
> Here’s a bit of a wild idea. Create a column in your confirmed orders sheet that will contain only email and business. This can be 2 separate column joined with a template, or you can write it to the sheet later already joined from the form button. Doesn’t matter. We just need email and buiness only. Next on your products, sheet follow the instructions here to get a lookup column of the user’s signed in email into the products sheet. [List Relation "Data"](https://community.glideapps.com/t/list-relation-data/7659/5) Next in the products sheet, create…

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 8:44am UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/6 "2020-04-27T08:44:40Z")

</div>

Sorry, I tried so hard but I really can’t get through you solution.  
I don’t understand how I can generate the column you are suggesting.

In the Menu sheet, where all the products of all the restaurant are listed, I have no way of having an email to concatenate to a restaurant because that sheet is global for everyone.

I can create a relation but than, when i try to create a template, all the rows get subjected to that template.

I think I’m really close to the solution but it’s getting frustrating.

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 10:14am UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/7 "2020-04-27T10:14:40Z")

</div>

I’m stucked in the first part of the solution.

In the Menu i’ve created several Columns to get the data you said:

 ![Screenshot 2020-04-27 at 12.10.52](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/01e4bb29b1454624ae92de84e007ac3f2f661a08.png)

**"Is in the cart"** Column is a Relation Column with the “Form Response” to check if I ordered an Item and give me back the entire row.

**"Email of the Orderer"** is a Lookup Column to look for the “Email” address in that relation string.

**"Email + Ristorante TEMPLATE"** is a IF/ELSE Column that create a template value EMAIL\_RISTORANTE

**"Email + Ristorante"** Finally, is the column that give me the Email + Business as you said.

Here comes the first issue, since if another signed in user make some order it doesn’t work…

---

<div class="post-metadata">

**Author:** ![Mariano\_Betta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mariano_betta/32/17895_2.png) [@Mariano\_Betta](https://community.glideapps.com/u/Mariano_Betta)\
**Post date:** [April 27, 2020, 12:24pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/8 "2020-04-27T12:24:54Z")

</div>

To get the email of the person who logged in, here is the explanation.

> [@List Relation "Data"](https://community.glideapps.com/t/list-relation-data/7659/5):
>
> BAM! I figured it out. First create an If/Then column on the user profile sheet that fills the column with the word ‘Name’ if signed in user. Next, on every sheet you want to display the name: Create a template column that contains the word ‘Name’. Create a relation column that joins the name template to the name template in the user profile sheet. Create a lookup column that gets the name from the relation. Bonus - make it look pretty. [image] [image]

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 12:41pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/9 "2020-04-27T12:41:59Z")

</div>

This is one of the main problem.  
The app automatically created a sheet called **App: Logins** for all users who made the log in procedure, but I can’t see it on the app database. Just on google sheet.

I was trying to add that column but I can’t figure out how…

---

<div class="post-metadata">

**Author:** ![Mariano\_Betta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mariano_betta/32/17895_2.png) [@Mariano\_Betta](https://community.glideapps.com/u/Mariano_Betta)\
**Post date:** [April 27, 2020, 1:05pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/10 "2020-04-27T13:05:02Z")

</div>

I used my own user sheet. I would look for a way for them to register. And do it based on that sheet.  
If you look I had to make several columns in the editor, possibly there is a simpler way, but for now it works.

> [@How to create an app for taking Sales Orders](https://community.glideapps.com/t/how-to-create-an-app-for-taking-sales-orders/7048/18):
>
> I managed to get an id to send each product. Your recommendation helped me, I’m not sure if I did as you tell me, but it was based on your idea. In the products table I already had the trade in each row, so I only had to add the mail, concatenate it to control with the confirmed table. While I succeeded, I had to make multiple columns in the editor. Surely there is a simpler way, but I’ll show you to see. In the spreadsheet I entered the word name to all the products, to relate it to the use…

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 1:12pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/11 "2020-04-27T13:12:12Z")

</div>

It’s getting confusing.  
I make as you did. Create a “User Profile Sheet” with a google sheet formula that just get the emails of users that already signed in.  
Than I created the reference to the Email.

Than in the Menu Sheet i have this situation:

 ![Screenshot 2020-04-27 at 15.11.12](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/dfb7bbebd863003a1d3b72460a0da52ddf5705b0.png)

I get the user signed in for every column of the menu. And so the relation is for **Every item** , not just the one that i put in my cart…

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 1:18pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/12 "2020-04-27T13:18:35Z")

</div>

The fact is, i didn’t get the solution. I’m just blindly following the instruction so I get stucked.  
Could you show me some of the logics you used behind the columns with images?

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 3:43pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/13 "2020-04-27T15:43:52Z")

</div>

Ok so I went through again and again and I’m getting closer.

First of all I added the 2 column EMAIL\_RESTAURANT and EMAIL\_RESTAURANT\_COUNT into the **Menu Sheet**

I pass the value to the cart once I submit every item, and then I pass the value on the Confirmed Order when I confirm order.

If I try with different users, it seems to work but if I try several times with the same user it keep the same Count in the order sheet…

---

<div class="post-metadata">

**Author:** ![Mariano\_Betta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mariano_betta/32/17895_2.png) [@Mariano\_Betta](https://community.glideapps.com/u/Mariano_Betta)\
**Post date:** [April 27, 2020, 5:26pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/14 "2020-04-27T17:26:30Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/6bb08d7c2c849c34a48a86867466c2eb27723003.png)

We start with the count at 0.  
I got 0 by relating the EMAIL\_RESTAURANT column of the menu table  
with EMAIL\_RESTAURANT from the confirmed orders table.  
The first time it gives 0 to all the articles.  
When you confirm another order, you should give 1.  
That is, the count is made with that column. And the subsequent relationship from the table confirmed orders with the articles is going to be done with the column EMAIL\_RESTAURANT\_COUNT.  
You have to use matrix formula, I only did that example in an excel.

I’m not very good at explaining, but the most important thing is the logic.  
I do what I can within the short time I have.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 27, 2020, 5:47pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/15 "2020-04-27T17:47:52Z")

</div>

Hi, I am in the middle of Developing multiple sign up food ordering platform with links to various payment processing companies. Have a look at this and tell me if this is what you seek. It’s not finished yet so ignore a lot of things. Just start ordering and see what happens. Tx.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 27, 2020, 5:52pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/16 "2020-04-27T17:52:13Z")

</div>

> **[LETSEAT](https://sylheteat.glideapp.io/)**
>
> DEMO

It’s only demo for u. Is this what you want in your cart?

---

<div class="post-metadata">

**Author:** ![fi.low](https://avatars.discourse-cdn.com/v4/letter/f/e79b87/32.png) [@fi.low](https://community.glideapps.com/u/fi.low)\
**Post date:** [April 27, 2020, 7:53pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/17 "2020-04-27T19:53:52Z")

</div>

> [@Wiz.Wazeer](#):
>
> [https://sylheteat.glideapp.io/](https://sylheteat.glideapp.io/)
> 
> It’s only demo for u. Is this what you want in your cart?

@Wiz.Wazeer This is exactly what I’m trying to do… Did you used Mariano’s solution?

@Mariano_Betta I really appreciate your help. I try with your logic per your last image. Let’s see…

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 27, 2020, 8:02pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/18 "2020-04-27T20:02:19Z")

</div>

Thanks a lot. Sorry which is the Mariano app?

---

<div class="post-metadata">

**Author:** ![Mariano\_Betta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mariano_betta/32/17895_2.png) [@Mariano\_Betta](https://community.glideapps.com/u/Mariano_Betta)\
**Post date:** [April 27, 2020, 8:13pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/19 "2020-04-27T20:13:02Z")

</div>

Hello @ fi.low, test if it works for you.  
But if @ Wiz.Wazeer’s solution is what you are looking for, maybe he can help you in a simpler way.  
I am continually changing my application.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 27, 2020, 8:16pm UTC](https://community.glideapps.com/t/delivery-app-retrieving-order/7867/20 "2020-04-27T20:16:11Z")

</div>

Oh sorry I get what you mean now. No I did not follow that chat. I have not finished my app yet. I’m still testing a few functionalities. Let me finish everything and then I’ll share everything with you.

To put it in a nutshell. Jeff was directing you in the right direction but I implemented a completely different methodology. The basic concept is to have two sheets.

1. Response sheet (orders sheet).
2. Final order sheet. Inside the orders sheet in your app you would need to create the final order sheet. But here is the trick. The orders sheet and the final orders sheet would have to be almost duplicates. You would use the special column values (Jeff’s idea) from the order sheets to fill the final orders sheet with the missing information from the orders sheet. But I identify confirmation of the final order by checking it against the email and timestamp of the orders sheet. I’m sorry I am just an easy solution seeker. Let me finish it and I’ll share a copy with you. Its not done yet but as you could see it’s already working. Please give me a few days. Tx.

[Next page](https://community.glideapps.com/t/delivery-app-retrieving-order/7867.md?page=2)
