# Creating a gamified in-app store/inventory

**URL:** <https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225>\
**Category:** Ask for Help\
**Created:** [February 3, 2020, 4:56pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225 "2020-02-03T16:56:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 3, 2020, 4:56pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/1 "2020-02-03T16:56:37Z")

</div>

Hey all. Wondering if anyone has a solution:

I want to create a shop that would display items that users could purchase with in-app currency. Once purchased, they would show up in the player’s inventory…when using an item, the item would disappear.

So far, I’ve managed to:  
1.) Allow players to purchase items  
2.) Display purchased items for each sign in user  
3.) Deduct item cost from current balance for each user  
4.) Allow users to “use” an item (which then gets removed from inventory)

The lone issue is preventing the user from purchasing (or even seeing) an item if they don’t have enough funds to purchase it. Right now, I can make the logic work in the spreadsheet, but it doesn’t seem like Glide can handle the logic (as it would have to compare multiple data points).

Any thoughts? Here’s the app (crude) so far: [https://itemstore.glideapp.io](https://itemstore.glideapp.io)

As you can see, you can purchase an item and it will show up in inventory, but users can purchase items they can’t afford and their balance hits negatives.

Any ideas welcome!

---

<div class="post-metadata">

**Author:** ![Sandro\_Brito](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sandro_brito/32/552_2.png) [@Sandro\_Brito](https://community.glideapps.com/u/Sandro_Brito)\
**Post date:** [February 4, 2020, 6:29pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/3 "2020-02-04T18:29:01Z")

</div>

Robert I’ve done something similar based on [https://concepts.glideapp.io/](https://concepts.glideapp.io/)  
What I didn’t do was not allow the item to be seen in case the user doesn’t have money.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 4, 2020, 6:40pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/4 "2020-02-04T18:40:02Z")

</div>

Hi Sandro,

How do you prevent users from going into the negatives, then?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 4, 2020, 6:43pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/5 "2020-02-04T18:43:31Z")

</div>

@Jeff_Hager Check out your concepts app …did a transfer and it went into negatives…can you prevent?

---

<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:** [February 4, 2020, 7:36pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/6 "2020-02-04T19:36:18Z")

</div>

I reset the purchases and made a small change to hide the transfer and items list when the user has a negative balance. It doesn’t solve the problem of going into negative. I’ll have to think about that one. Glide doesn’t have any field editing to show a message if a value doesn’t fit within tolerances. Glide also doesn’t have any current features to access global values, such as a users current balance when applying a filter for visibility. If I think of something, I’ll update the app and let you know.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 4, 2020, 10:20pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/7 "2020-02-04T22:20:21Z")

</div>

Thanks @Jeff_Hager! Global values/variables would certainly take glideapps to a whole new level.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 7, 2020, 4:19am UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/9 "2020-02-07T04:19:12Z")

</div>

Well…I finally figured it out. Took me forever to find the right formulas, and it’s a bit heavy on the row usage, but check out the functionality:

[https://itemstore.glideapp.io](https://itemstore.glideapp.io)

The app can  
1.) Allow players to purchase in-app items using in-app points/currency  
2.) Display purchased items for each signed in user within their “inventory”  
3.) Deduct item cost from current balance for each user  
4.) Allow users to “use” an item (which then gets removed from inventory)  
🆕 5.) Allow users to “drop” an item (which then gets removed from inventory)  
🆕 6.) Set a max inventory capacity (so users would have to drop/use items in order to buy new ones  
🆕 7.) Prevent users from purchasing items if they don’t have enough funds (also to prevent users from going to negative balance)  
🆕 8.) Display whether a user already owns an item  
🆕 9.) Display users that also own this item

🔜 \*Allow users to earn in-app currency by watching videos, making comments, etc.  
🔜 \*Develop a leaderboard  
🔜 \*Develop a ranking system

 ![Screen Shot 2020-02-06 at 11.18.47 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/00b50436779750ca9c9b5c85707969ab365fd4e9.jpeg)

I’ll post a video tomorrow to explain! Stay tuned!

---

<div class="post-metadata">

**Author:** ![Mr\_Watkin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mr_watkin/32/349_2.png) [@Mr\_Watkin](https://community.glideapps.com/u/Mr_Watkin)\
**Post date:** [February 7, 2020, 4:49am UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/10 "2020-02-07T04:49:38Z")

</div>

Oh. My. Glideness.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 7, 2020, 7:10pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/11 "2020-02-07T19:10:32Z")

</div>

As promised:

---

<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:** [February 9, 2020, 7:54pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/12 "2020-02-09T19:54:35Z")

</div>

Just an idea instead of a using a pivot table.

1. Place the formula you have to get the list of users/items/affordable in a new sheet called InventoryAffordable
2. Create a template column in the Inventory sheet that joins the Inventory item to the word TRUE (ex. “Pencil - TRUE”)
3. Create a template column in the InventoryAffordable sheet that joins the inventory item to the affordable column.
4. Create a relation column in the Inventory sheet to link the template column in the inventory sheet to the template column in the InventoryAffordable sheet.
5. Create a lookup column to get your list of emails.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 9, 2020, 8:45pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/13 "2020-02-09T20:45:58Z")

</div>

I will try this and let you know!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 10, 2020, 3:25pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/14 "2020-02-10T15:25:43Z")

</div>

Tried this today…I’m getting stuck at step 2.

---

<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:** [February 10, 2020, 6:06pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/15 "2020-02-10T18:06:44Z")

</div>

This is what I’m picturing for the template column:

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

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 10, 2020, 6:52pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/16 "2020-02-10T18:52:03Z")

</div>

Thanks. I’ll keep workin’!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 10, 2020, 7:19pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/17 "2020-02-10T19:19:14Z")

</div>

Here’s the latest version with the latest features:  
1.) Restricts items from being bought if no inventory slots are available  
2.) Displays Rank and XP for user  
3.) Displays all ranks available  
4.) Displays “public profile” for each user of a given rank

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 12, 2020, 6:08pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/18 "2020-02-12T18:08:59Z")

</div>

🥳Yeaaaaaah buddy!

👊Über props to @Jeff_Hager…just spent 2 hours making glide app columns replace my vlookup columns in Sheets and now I have INSTANT conditional data 🙌 for the following features of the app:

- Enough funds to purchase? INSTANT CHECK
- Enough inventory slots to purchase? INSTANT CHECK
- Making a purchase? Current balance is INSTANTLY CALCULATED
- Dropping/Using an item? Inventory slots are INSTANTLY CALCULATED

Play around with it here and let me know if you experience any glitches!  
[itemstore.glideapp.io](http://itemstore.glideapp.io)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 12, 2020, 7:55pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/19 "2020-02-12T19:55:20Z")

</div>

The audio is a bit soft, my apologies, but here’s the logic behind the ZERO LAG!

---

<div class="post-metadata">

**Author:** ![Christophe\_HK](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christophe_hk/32/4161_2.png) [@Christophe\_HK](https://community.glideapps.com/u/Christophe_HK)\
**Post date:** [February 12, 2020, 8:21pm UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/20 "2020-02-12T20:21:18Z")

</div>

😉👍🏻

---

<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:** [February 14, 2020, 1:37am UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/21 "2020-02-14T01:37:57Z")

</div>

@Robert_Petitto You inspired me to modernize my currency transfer demo in the concepts app. The only thing I’m missing is the prevention of purchase if users don’t have enough funds. The logic is in place to check if a user has enough funds, but since it’s public and I’m emulating fake signed in users, I can’t actually apply the visibility to check if the signed in user is in the list of affordable emails. I also have no way of restricting transfers. At least it functions very much like yours. Thanks for the videos!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 14, 2020, 2:13am UTC](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225/22 "2020-02-14T02:13:44Z")

</div>

Right on! 🤘 Glad you were able to benefit from my one of my Glide projects! You’ve been instrumental in helping me see the benefits of doing things “in house” rather than solely in the Google Sheet. Let’s keep it goin’!

[Next page](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225.md?page=2)
