# Item quantity count

**URL:** <https://forum.adalo.com/t/item-quantity-count/1081>\
**Category:** Get Help\
**Created:** [May 2, 2020, 1:42am UTC](https://forum.adalo.com/t/item-quantity-count/1081 "2020-05-02T01:42:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexanderjason](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/alexanderjason/32/581_2.png) [@alexanderjason](https://forum.adalo.com/u/alexanderjason)\
**Post date:** [May 2, 2020, 1:42am UTC](https://forum.adalo.com/t/item-quantity-count/1081/1 "2020-05-02T01:42:03Z")

</div>

Hello everyone, Please i need help getting this to work, i have tried all i could to get it working. the examples i found here are a bit too hard to understand. Please i need help

thank you!

 ![WhatsApp Image 2020-05-02 at 2.27.23 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/1X/218403a5530fc0415ace626da0f549f1601a7259.jpeg)

---

<div class="post-metadata">

**Author:** ![Ben](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/ben/32/9_2.png) [@Ben](https://forum.adalo.com/u/Ben)\
**Post date:** [May 4, 2020, 2:58am UTC](https://forum.adalo.com/t/item-quantity-count/1081/2 "2020-05-04T02:58:14Z")

</div>

Can you share some more context of how the screens and database in your app are set up?

---

<div class="post-metadata">

**Author:** ![alexanderjason](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/alexanderjason/32/581_2.png) [@alexanderjason](https://forum.adalo.com/u/alexanderjason)\
**Post date:** [May 4, 2020, 6:46pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/3 "2020-05-04T18:46:39Z")

</div>

Would a screenshot help?

 ![collection](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/1X/78c56658c3fc4310ed05c43e9937eae4f139e44d.png) ![menu](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/1X/2e1d7c5708829372b851963857f7d4ae9f7430af.png)

---

<div class="post-metadata">

**Author:** ![yifeixkou](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/yifeixkou/32/839_2.png) [@yifeixkou](https://forum.adalo.com/u/yifeixkou)\
**Post date:** [June 20, 2020, 8:52am UTC](https://forum.adalo.com/t/item-quantity-count/1081/4 "2020-06-20T08:52:29Z")

</div>

Hi @alexanderjason. Any luck with the solution? Would very much like to know how does this work as well.

---

<div class="post-metadata">

**Author:** ![alexanderjason](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/alexanderjason/32/581_2.png) [@alexanderjason](https://forum.adalo.com/u/alexanderjason)\
**Post date:** [June 22, 2020, 11:24am UTC](https://forum.adalo.com/t/item-quantity-count/1081/5 "2020-06-22T11:24:01Z")

</div>

No luck still, and no one has been willing to help!

---

<div class="post-metadata">

**Author:** ![projectlinuxsupports](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/projectlinuxsupports/32/1023_2.png) [@projectlinuxsupports](https://forum.adalo.com/u/projectlinuxsupports)\
**Post date:** [June 22, 2020, 1:02pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/6 "2020-06-22T13:02:40Z")

</div>

Hello, I think first of all you can’t have a separate Quantities Collection. You need to make that quantity as a field in the Menu (or maybe Current Order Items \> Menu \> Quantity).

After you have that quantity field bind to the menu, you just simply update the current Menu. And then add the current Menu \> Quantity by 1.

Hope some of these screenshots can help you :

![Image 4](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/a/a1680d2eaecad5275550de16778b5a367a320ab2.png)

![Image 3](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/3/3b3e45949f8d236147c39b9adc757f1c4f84cb42.png) ![Image 2](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/d/d4f25ddf39836c4995e535de978712b67f2e8983.png) ![Image 1](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/7/75e55fef0217ced4f1117c2174421ba5e16206cf.png)

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [June 22, 2020, 8:08pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/7 "2020-06-22T20:08:44Z")

</div>

Hi @projectlinuxsupports

Also interesed by such project type :  
So… in order to register properly the order,  
the process could look like this, right ?  
(…or am I missing something)  
\*using relationships between collections…  
 ![order process](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/2/2d47e09b063cd27d74ee0e2970334ec826d976a1.png)

Fedora 🤗

---

<div class="post-metadata">

**Author:** ![TORCH](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/torch/32/12331_2.png) [@TORCH](https://forum.adalo.com/u/TORCH)\
**Post date:** [June 22, 2020, 10:34pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/8 "2020-06-22T22:34:21Z")

</div>

This is easy in Adalo:

1. You need an input field for that Zero 0 you will need to name it quantity
2. Make those + - icons a button with action:  
Action could be
3. The N Price filed is a textfield with formula (menu item price\*quantity count) . The value of quantity field comes from input

There’s a video tut for this search working with formulas in Adalo

---

<div class="post-metadata">

**Author:** ![projectlinuxsupports](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/projectlinuxsupports/32/1023_2.png) [@projectlinuxsupports](https://forum.adalo.com/u/projectlinuxsupports)\
**Post date:** [June 23, 2020, 5:20am UTC](https://forum.adalo.com/t/item-quantity-count/1081/9 "2020-06-23T05:20:12Z")

</div>

I’m sorry I don’t quite understand the image that you’re showing. But if I assume that this is a Restaurant menu ordering app (that the TS shows), maybe what we can build is something like this :

We need 3 Collections :

1. Menus  
Menus Collection will hold all of the menu item database that the owner of the restaurant will input. This will hold all maybe the name of the menu, the price, the image, the description.

2. Orders  
Orders is every order that the customer create. An Order will consist several Order Items records.And at the end will consist the total price of all the item that the customer order.

3. Order Items  
Order items consists the quantity and the subtotal price of every menu that the customer orders.

We can add any additional field that we need. For example I add Order Number field and Order Item Field.

These are some of the screenshots of mine :

![Image 3](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/6/6f3287d3853b25bd0a83f2808ce18925e3e945bf.png) ![Image 2](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/8/8fdef80b256647891b63c9575e0a7af3c7322e3e.png) ![Image 1](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/7/71e8d80934cd296fee9bc1921ded7d561868494c.png)

Next, let’s talk about the relationship.

1. Menu with Order Item (many to many)  
We want the customer can add and subtract the quantity of every menu that they’ll order right? So we need to link these 2 collections
2. Order Item with Order (many to many)  
We want in every Order will consists all of the order item with the quantity and the subtotal price. So we can sum all of them at the end.
3. Order with Users (1 order belong to 1 user, 1 user can have multiple order)  
This just to link who’s creating the order.

So the final result of our Collection will become like this :

![Image 6](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/2/294287eafdbcf12e378407fdc4feef7d2edc8c85.png) ![Image 5](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/0/0a4323146c171d27338bcbf904025afd4b4dece5.png) ![Image 4](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/a/a60b04559dca90c5df3803272ed5eb193e7804dc.png)

Now let’s begin with the steps

1. First we need a button to create the order. Add the logged-in user to the user relationship, and add some count on the order number so we will have a different order number in every Order. Last, link this button to another screen that will shows all of the menu. Let’s call it Order Menu screen.  

2. In the Order Menu screen, we need to add 1 list that contains Menu Collection (no filter, because we assume we always want to show all of the menu to the customer). Always use Custom List in Adalo, because most of the time we will need to add another custom list inside those custom list.  

3. Now the hack is in here. At the moment, there is no Order Item record in every Menu record right? Because the customer is not yet order anything. So we need 1 groups of component that has only 2 objective : to shows 0 quantity & to create a new Order Item record. After this new order Item created, we will hide this group of components. That’s why we need to change the visibility of this components’s group to Sometimes Visible \> Current Menu \> order Items \> Count \> 0.  

4. Now we need to add actions to that plus button. I found that at least I need to add 3 actions :  
a. First, create a new Order Item  
b. Update that particular new Order Item to add the Current Order, add the Current Menu, calculate the quantity.  
c. Update again that particular new Order Item to calculate the Subtotal Price. (because I’ve found that if we calculate this subtotal price in point b., it always shows 0 subtotal because of the quantity still 0)  
Note : If you found a simpler way to achieve this, that’s would be fine!  

5. After the new Order Item created, it will hide that component’s group. So now what will we show to the customer? Of course a list of the new Order Item that’ve been made. But not the list itself we want to show, right? we want to show only the quantity.  
Hence We can copy our previous component’s group and make it a Custom List. This will be a Current Menu \> Order Item.  

6. After point 5, everything will be much easier. Because we can now tap into all of the dynamic value of the Current Order Item. We can change the text with Magic Text that shows Current Order Item \> Quantity. We can also add action to the Plus and Minus icon so it can add and subtract the Curren Order Item \> Quantity.  

7. The last hack I’ve made is with the subtract icon. I need to make 2 conditional Actions. That if the number of Current Order Item \> Quantity is equal to 1 and the customer click on it (so the quantity will turn to 0), I will delete that Current Order Item. Why? Because if the quantity is 0, that means the customer is not ordering that menu right? So we don’t want to include this Order Item anymore.  

I think that’s all for the “item quantity count” purpose.

For the final part, I want to show another tip to make the order summary page. Because here we need to again use the nested custom lists technique.

 ![Image 22](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/8/8eb9012b1842a6c1d7b20ad6f50cc3c19a341649.png) ![Image 21](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/0/015f2b267d13c1f75a44d54149e39e23a0d07171.png)

The main idea here is we want to show all of the Order Items of the Current Order. And inside each of the Order Item, we want to show what Menus that’s related to that particular Order Item.

That’s it. Hope all of this make sense for you, and make changes accordingly.

Here’s the test app that you can test it : [Restaurant Order Menu Test App](https://previewer.adalo.com/cc6dda03-5ebe-45f4-b950-ece6dc67df0c)

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [June 23, 2020, 6:32am UTC](https://forum.adalo.com/t/item-quantity-count/1081/10 "2020-06-23T06:32:23Z")

</div>

Yes its more or so for both in-house ordering as well as Delivery (lately Delivery has benefit many food places’ owners - that otherwise would have had to close for good 😷)  
Your pictures make lots of sense yes, great configuration !  
…as for the create/update/update step, no I can not think of better way to do so, indeed I’m using the same method intuitively 👌  
one dumb thing I had not figured out is how simple it is to create the Auto-increment ID by using…count() 🙈  
had not tought of that but it makes so much sense now 😄  
for the rest i’ll have to build it to see it at work  
thanks for the link too 😋  
Thanks for the great step by step walk through… 👌

---

<div class="post-metadata">

**Author:** ![yifeixkou](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/yifeixkou/32/839_2.png) [@yifeixkou](https://forum.adalo.com/u/yifeixkou)\
**Post date:** [June 28, 2020, 2:16pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/11 "2020-06-28T14:16:10Z")

</div>

@projectlinuxsupports

Wow, that was a very comprehensive explanation.

Works like a charm!

Thanks alot!

---

<div class="post-metadata">

**Author:** ![Blasphemy](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@Blasphemy](https://forum.adalo.com/u/Blasphemy)\
**Post date:** [August 27, 2020, 6:49am UTC](https://forum.adalo.com/t/item-quantity-count/1081/12 "2020-08-27T06:49:48Z")

</div>

nice guide. but your test app has a bug.  
as i tried to hit “+” 4 times quickly, it registers \*4 times for price correctly. but it registers \*2 count of menu item. i guess it differentiates price is calculated at phone device and item count needs to be recorded to database.  
 ![error](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/3/3cfaa108ff1246e4f62fe84b5aef97d490799767.jpeg)

---

<div class="post-metadata">

**Author:** ![nouahenri](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@nouahenri](https://forum.adalo.com/u/nouahenri)\
**Post date:** [July 3, 2022, 2:33pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/13 "2022-07-03T14:33:45Z")

</div>

hello , please iam a beginner with adalo. So please can you explain how did you obtain LIST 2 and LIST 3 ( Step 5 ) . Also can you give more details about the group components to mange the quantity in step 3 ? thanks you

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [July 3, 2022, 3:27pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/14 "2022-07-03T15:27:55Z")

</div>

Hi @nouahenri,

Welcome to the community 🥳

This post will help you! : [Let's build Online Ordering App (clone-able)](https://forum.adalo.com/t/lets-build-online-ordering-app-clone-able/27052)

And this may help you too! : [Renew order items quantity - #11 by dilon\_perera](https://forum.adalo.com/t/renew-order-items-quantity/28865/11)

Hope this helps!

Thank you

---

<div class="post-metadata">

**Author:** ![nouahenri](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@nouahenri](https://forum.adalo.com/u/nouahenri)\
**Post date:** [July 3, 2022, 4:21pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/15 "2022-07-03T16:21:49Z")

</div>

Hi thank you for your help. but i really want to now how to do this step by steph. i’am beginner so if you can help me by showing screen shot step by step mainly how to add and substract quantity with (-) and (+) buttons or component , i will be very gratefull.  
Also is the possiblity to add me as team concerning let’s build online ordering app so that i can understand the way you build this . My email adress is [nouahenri@gmail.com](mailto:nouahenri@gmail.com)

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [July 3, 2022, 4:25pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/16 "2022-07-03T16:25:06Z")

</div>

On the two posts that I mentioned the apps are clonable so you can clone them and see the setup in your end!

If you need a video I will make a video.

---

<div class="post-metadata">

**Author:** ![nouahenri](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@nouahenri](https://forum.adalo.com/u/nouahenri)\
**Post date:** [July 3, 2022, 4:28pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/17 "2022-07-03T16:28:38Z")

</div>

how to clone the app please ? a video will be very helpfull

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [July 3, 2022, 4:29pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/18 "2022-07-03T16:29:28Z")

</div>

Click on the app and click the Clone button.

> **[Cloning Apps and Making Apps Cloneable](https://help.adalo.com/settings/copying-vs-cloning-your-app/how-to-clone-an-app)**
>
> Create cloneable links to your apps so that others can duplicate it into their own Adalo account or clone some apps yourself!

---

<div class="post-metadata">

**Author:** ![nouahenri](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@nouahenri](https://forum.adalo.com/u/nouahenri)\
**Post date:** [July 3, 2022, 5:03pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/19 "2022-07-03T17:03:24Z")

</div>

thanks ypu very much , lets me share my projet so that you help me . i want to add and substract item from order item  
[https://previewer.adalo.com/5f121d18-d926-4a7b-bea5-1fdc677b99d3](https://previewer.adalo.com/5f121d18-d926-4a7b-bea5-1fdc677b99d3)

---

<div class="post-metadata">

**Author:** ![nouahenri](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@nouahenri](https://forum.adalo.com/u/nouahenri)\
**Post date:** [July 3, 2022, 5:08pm UTC](https://forum.adalo.com/t/item-quantity-count/1081/20 "2022-07-03T17:08:12Z")

</div>

ok thanks you , i am wating the video pls

[Next page](https://forum.adalo.com/t/item-quantity-count/1081.md?page=2)
