Gamify your Glide App #5: Item Store and Inventory

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey it's bob from wams tech and today we're going to continue with our gamify your glide app series this is episode 5 inventory and item store this is one of the ones i know has been most requested in today's video we're going to create an online or an in-app store that uses our in-app currency in which when the items that we purchase will be added to our inventory and our inventory will be capped off at a number that you specify so just like all the other videos we're going to start off by creating a new sheet and let's start with our store so i'm going to create a new sheet here called store or you can call it shop or item store or whatever else you want to call it right and we need to create the items for our store so first we have to create our column headers something to the effect of what the item is we can say like item name we need the item description we need the cost of the item uh let's see we need the item image i'm going to create this one actually in the data editor so i can specify that it's an image column so we need the image let's see what else maybe a rank requirement this would allow us to set what rank is needed in order to purchase this item so that way we can tier our items as well that should be good all right so let's go ahead and refresh our sheet and i'm going to upload that image column so here in the data editor i'm going to go now to our store i'm going to add a new column i'm going to make it a basic column image and i'm going to call it item image done all right so then this should appear over here great i have this empty column i can get rid of all right let's add some items to our store uh you can if you have if you're doing cards you could add your cards here if you're doing materials you could do materials let's do materials so uh what are some classic role playing game materials lumber linen right linen paper steel maybe fine cloth leather all right and the item description you know used for construction used for clothing used for writing used for again construction weaponry used for armory used for clothing or accessories okay and we'll give this some cost we'll just everything would be arbitrary here let's say you know six gold four gold two gold ten gold eight gold rank requirement so this you'll need to go back to your ranks sheet to see what rank is needed so um like linen novice can have that paper novice can have that then need bronze maybe in order to get lumber steel you need to have silver and silver something kind of easy all right and then the image we're going to look for that i mean if you already have images you can pull in great i'm going to actually look for them here in unsplash just to make things faster on our end because we don't have all day all right so i'm going to add let's look for lumber and look at all these pieces of wood that's good like that linen i'm gonna get like tablecloths that's actually not bad linen paper or parchment steel trying to get some eye beams ooh i like that one that's good and then leather blue leather red leather red leather yellow leather red leather yellow leather some leather working tools maybe this one okay all right so now that we have our items now we need to create our item store this is the fun part so back in our tabs we are going to create a new tab for our store we can call it shop store and this will be um our store sheet and we can find a picture of a store of course all the ones we want are pro ones how about like a tag with a price tag something like this maybe that works we can do a shopping cart maybe all right and then again what kind of layout do you want for your store if you want to have a nice diverse layout like amazon where you have like things scrolling this way and things scrolling this way then you have to do a details view right so in our layout we're going to change from list to details view and we're going to trash all the preset stuff it gives us and now we can add in our items oh but first back in our tabs we also want to make sure our store is not visible to anybody without a profile so visibility so tabs store visibility we're gonna only show it when has profile is true all right so here's our store all right let's go ahead and add in an inline list so i'm gonna add an inline list of our store items like so the image will be the item image and here you can play with how you want your store set up i really like the cards view or the tiles view for this particular for this particular tab so like tiles you can actually see the nice image here and you want to show more than one item at a time so you could do two at it here right so i show two tiles per row maybe the cards view instead so you can see more of the image than the text underneath it that way the texas and blocking our nice image that we chose we want to see more of the image so instead of three to one we can do maybe three to two all right we also need some more information here maybe we do all caps titles maybe we do a what's our header b header could be the rank requirement needed now let's play this a little bit all right so first thing let's go back to our data editor let's kind of clean up our our items here so our cost it gives us the number but we want to also choose the the unit so no group separator i'll be at group separator and then units would be like gold right but we're using that inventor using the emoji for gold as our as our um icon or symbol all right something like that let's also get the rank image as well so we need to do a relation from this rank requirement to the rank image so i'm going to add a column i'll call this rel rank we're going to make it a relation where the rank requirement matches the values in our ranks sheet ranks name there's only one rank to match so that works okay and then let's also get our points we have to in order to do the check to see if you have the acquired rank in order to purchase this item we have to use the xp value not the name reason being is because if i'm a silver let's say that means i should also be able to have all of the items for a bronze and for a novice and just having the name of the rank doesn't help us with that hierarchy we have to have the value of what that's worth so we can do a mathematical comparison and we can't do a mathematical comparison with words we have to do it with numbers so let's add in the rank min points required so that way we can check to see if we've satisfied that condition so we're going to do a lookup of our relation to grab the minimum points and let's also grab the rank image and we'll do a lookup of our rank relation for the rank image there we go so now we have some more information here about the item itself this is looking good okay um maybe we want to have a uh instead of just saying bronze maybe we should say like bronze required so for that in order to merge two things together we need to do a template column so we'll do a template column we'll call this rank needed now again as i mentioned in the second video i like to put the words display that way i know this is for display purposes only this is not a template column i'm using for linking let's say so we'll do a template column we'll do r for rank and then we'll say the words needed so for r r and then r stands for rank so now we see bronze needed novice needed knob is needed so forth all right so then maybe now our header is our cost right our title is the name of the item if we want to have the details be the description we can do that too and then at the bottom here we can choose to have our avatar be our rank image and our avatar text be our rank needed display something like this let's do smaller screen so we're not using as much vertical space here it's looking good um if you feel like these cards are too long now right you can maybe throw this header into the tag you can do the cost up here maybe it's kind of hard to see but because you have yellow and gold but you kind of get the idea you can play around with the formatting of how you want your shop to look like but for our purposes today that looks good all right and then once we have our items now we want to be able to purchase these items but we should only be able to purchase items that we have the funds for right so to do that we need to bring in our user information into our store and how do we do that we do it through our user profiles so we've already created our user profiles in our first video and now we have to bring in that information into our store so we can make start making comparisons right so to do that we need to grab the current user email so i'm going to add a column and i'm going to call it current user and user email fine and this column type is going to be a a template and we'll do e for email and we'll replace the e with the user email address so whoever is the current signed in user that's going to be what is seen here in the current user okay so if i sign in as somebody else right in our user sheet here i have this gym at email.com right if i sign in as jim i see that jim is the current user in this sheet and i can start bringing in some information regarding that we'll talk more about that in just a second so now that i have my current user information now i can start making some relationships and bringing in some other items um we can probably even skip making the relation we can probably just keep going with uh with lookup columns from our user sheet so let's do the user gold because that's we need to see what how much gold each uh our user has right so we can do a template we'll do g for gold and g can be the user gold total gold like that then we can need to total xp so it's a user xp again template we'll do x where x stands for user total xp here we go so what's nice is that we have the rank xp needed and we also have the user xp available we have the cost in gold and we also have what their user gold currently is so because of this we can now start making some checks to see if they have enough gold or if they have enough experience points all right so let's make those checks too while we're here so we can call can afford this is going to be an if then else and we're going to say if the cost is greater than their balance their gold balance so why have it now it's not let me pull in the template column huh all right well i guess i can do from the user sheet instead interesting maybe because i didn't do a relation look up i'm using just a template column it is not recognizing that template column as as a number for some reason okay that i think that's a glitch anyway we'll just i guess we'll just do it this way so user total gold so if the cost is greater than the total gold then it should be unavailable so can they afford it false okay otherwise true and right now i can afford all of these items because my user gold 30 is more than the cost so i guess we don't need this user gold column i'm guessing the same is true for the user xp which means i probably don't even need this user email address either but we'll talk about i guess i guess we'll cross that bridge when we get there all right so how about this do they have enough rank right enough rank if then else and we'll say hey if their rank requirement is greater than oh it's not the regular car sorry is the the um the minimum points where is that rank minimum points required okay is greater than yes it's not there either okay so user total xp then false else true okay so because i am bronze and i haven't reached the silver status yet you see that i do not have enough rank for these two items but i do have enough rank for these three so now we have some true false values that we can use to filter our store the last one we're going to do and we'll we'll create this after we've done our inventory is are there enough slots left in your inventory in order to purchase this item we'll cross that bridge when we get there all right so we have some conditions now all right so now we're ready to purchase some items but to do that we need to have a log of all those transactions so we're going to create that log in our spreadsheet so in our spreadsheet we're going to create a new sheet and we're going to call this transactions [Music] so let's determine what information we need from the user for the transactions we need the timestamp when they purchase the item we need their email address we need the item we need the cost if this item if they've used this item right we'll do a check to see whether or not they've used the item or dropped the item so used if you want to separate those out maybe they can use an item and it does something then they drop an item and it does something these can be two different values or you can combine the two so used item dropped item then we can also grab in the image in the description too since they're already there right so item image item description well maybe not because we want this to always be the latest image in the latest description so if we change it they're not seeing some old information here so let's actually delete that and we'll actually make that a relation column instead all right so we have the log to which we were going to record these items and now we are ready to purchase so i'm going to give my app a refresh and we need to create some buttons in order to purchase the item so here in my store let's buy some paper so i'm going to go to the paper button here and this is a really lame looking shell for our item here so let's make this look a little prettier let's add an image of our item and we don't want to take up all the space here let's make it three to two instead let's bring that to the top so here's our paper image we see paper used for writing the cost and then the rank requirement maybe we want to turn all of these into like the basic table all right so let's do a basic table all right so we need the rank requirement so we can say like rank needed display novice needed and then maybe the rank image like that if we want we can throw something around even above it yeah we can play with the layout all right so novice needed uh the cost will be the cost okay that's looking good again we have paper up here we have paper down there so i don't like having both if you want to that's fine otherwise we can do that empty character trick like we did before i'll leave it for now though all right and now we need the button in order to purchase the item so we're going to add a form button and we'll call this purchase item and we want to set some visibility conditions of this button right they shouldn't be able to purchase if they don't have enough gold and if they don't have enough rank so both of those conditions need to be true which is an and condition so we're going to come to features visibility where can afford is true and where enough rank is true and we'll go ahead and make that opposite button as well just to test things out right so let's duplicate our form button and we're going to call this cannot purchase item and maybe we'll create a button for each right cannot purchase item we can say like not enough rank or not enough gold right let's do first let's do gold first not not enough gold it's kind of i like the wording of that button that's okay not enough gold and this would be a grayed out button and we want this button to do nothing again so we'll do our little trick back over here in our store to create that dead link again so do the link we'll make this a template column and fill it in with a hashtag done and this not enough gold button under the features will be action open link where that target is that dead link so this button now does nothing and we're going to show this button only when can afford is false or is not true okay and we want to also show this button even if there's not a well and where and where their rank is high enough okay so and where enough rank is true so if they have enough rank but they don't have enough funds they're going to see the cannot afford button likewise we're going to duplicate this button and we're going to do it instead where not enough rank [Music] and this will appear when not enough rank enough rank is not true and that's it okay so for example silver is needed i do not have steel or silver so i should not be able to see the purchase button and instead i only see not enough rank right and i can't do anything because i not high enough with my rank but for lumber bronze is needed and i have bronze so i can purchase this item all right so now that i have a button that i can use to purchase an item let's go ahead and configure our form to match what's in our transaction log so purchase item and our destination sheet is going to be our transactions and what i typically do is they'll give you all of the default columns as components here and what i do is i remove one at a time and as i remove it i'll add in the correct column that i needed so for example this dropped and used i'm not using that as part of my form at all that's going to be for my inventory later so i'm going to just delete those the cost is going to be the preset cost already so here the cost the columns cost is going to be the cost for the item name i'm going to trash that and here i have the item name column will automatically fill into the item the item description column will automatically fill into the description oh wait i said i was going to do a relations never mind i cancel that let's see the email is going to be the special values user's email to email and then timestamp will be the special values current date and time to the timestamp so we've filled out all of these four columns here and now we have this empty form right so we need some sort of prompt to the user to submit this form based on the button right so we could do something like maybe what we can show them is a confirmation message that says purchase this item for blank gold and then you can see what their what their balance will be eventually here we can do that i think let's try it let's do a add column in our store let's try this so we'll add a column here where we'll have there we'll call this um balance this would be a math column where we'll have the cost of the item minus their gold and gold will be their current user oh i didn't bring in their gold we have to bring in their gold first all right see i think we tried doing that and it didn't work did it we'll try it again all right so this is um player gold or user gold where it's a template column where g stands for gold very user total gold let's try it again so this is going to be a math column we'll call this future balance [Music] where column type is the [Music] math where we have the cost minus gold all right so that works wait use your gold minus the cost all the way around and precision will be 1 group separator is fine we'll use the icon again here like that this is what what their future balance will be so we can show them what their balance will be after purchasing the item might be kind of nice all right so back in our form here let's go ahead and add in the image for the item again why not okay so then we can maybe add in a message that says purchase lumber for blank gold that could be a template column or we can just make it a text column and call it a day so we can do a text column here and say purchase item like that make it centered headline three and it can add in a basic table where are you basic table where we could say current balance which is their user gold right minus the cost and then we can say what your total gold will be right your future balance we can make that a text column so that way we can right align it and put it down over here right so we could say total balance or future balance like this and we can make this larger like a kind of almost looks like a receipt right and let's go ahead and add in a separator above that total here and if we want to say future balance we can do that too um you can call this remaining balance but we want to make it small or even smaller maybe or edit below i don't know play around with it that's fine so yes i want to purchase this item so i hit submit okay and now i've purchased this item and i should be able to see in my transactions that everything was filled out awesome all right so this cost also needs to have the same formatting so this is a precision of one use a group separator units is that gold dealie all right so now we have this transaction that's happened but as you'll notice my current goal is still the same because we haven't done any calculations yet of our transactions so that's the next step we need to now deduct from our current balance what we've purchased so we're going to do that in our user profile table because that's where all of our information is stored at the moment so i'm going to go back to my data editor here and i'm going to go to user sheet and i'm going to add a column and this column is going to be a relationship to the transactions transactions all right where this transactions is going to be a relation where the email address is going to match the values in our transactions email so it's going to pull in all of our transactions per email address in the user profile sheet and we're going to match multiple because yes we're going to have more than one transaction throughout our experience here and so now we have this rel transactions here and then we now need to do a roll-up of our total transactions that we've spent so far so we're going to call this um gold spent maybe and this is going to be a rollup column and we're going to summarize the values of our transactions cost by calculating the sum so you see that all of these other players haven't done any transactions yet but i have i didn't i've done that one for six gold done now i'm going to bring this all the way over to my gold sheet over here too right we have our total gold like we had our xp and then our total xp right xp from challenges we see we have our gold from challenges we have our gold spent and there's gonna be our total gold right so our total gold needs to be our gold plus the gold from challenges minus our transactions so t will stand for transactions gold spent boom so now you see my 30 turned to 24. now that's my remaining balance and because we're pulling that data in our store we should now see that in our item store so if i do a purchase item right now we see that our current balance is 24 gold pretty neat right maybe we want to show our current balance um above all the items in our store right so maybe we add that as our underneath our cost right current balance and this is going to be our current our user gold so the cost is six gold our current balance is 24 gold right we can add that here we can add that as a separate table maybe above again play around with the formatting how you like but at least we have that information in order to display it right so um let's go ahead and purchase some steel i can't because that's silver needed let's go ahead and purchase some more lumber i'm going to purchase it again submit so now you see my current balance is down to 18. let's purchase it again submit and let's purchase some linen submit current balance is eight let's purchase another ping of linen submit that costs four current balances for right so because now i only have four gold left i should not be able to purchase lumber for six gold you see i don't have enough gold all right it's working so how many transactions have i made so far right go to my transaction log i've made five transactions what if i want to drop one of these items right so i want to use it or i want to drop it we should be able to do that from our inventory tab now this is up to you where you want to store your inventory maybe you want to place it within your my profile maybe you want to create a separate tab for my inventory again completely up to you so i don't want this to get too convoluted let's just create a new tab for our transactions or for our inventory so i'm going to create a new tab here add i'm going to call this inventory and again you could easily do this just in your users tab if you want because we're actually going to use the users tab for this tab here so inventory users an icon can make a bag or a satchel of some kind do i have a bag like this maybe that's good enough and let's bring our inventory next to our profile so in order to grab our items we need to do a relation to our transactions which we've already done and we need to display that relation so here we actually need to do the details view here so we're going to do details and we are going to scrap all of this and we want to keep our relation our inline list of our transactions so here are all the things that we purchased and to make this look like an inventory slots usually you have like you know three across and three down or something i'm gonna go with the number nine for now so we'll do tiles we'll do three across and maybe we'll do square images here so we can see the full image possibly where our image is the item image which we haven't yet created oh no we have to do that all right so pause inventory let's grab some stuff i'm going to go to the data editor transactions and we need to grab the image and the description so we're going to add a column we're going to do this first relationship to the shop where column type is the relation we're going to relate where the item name matches the values in store item name now just a caveat here because we're using the an actual word rather than some unique number if you change the name of your item at any point it's going to break the shop so what you also might want to do here is in your store create a column called row id and call this item id [Music] and it's going to create a unique value for all of these items in our store kind of like a barcode right or a sku number and we can pass this information along to our transactions as well that way in case we change what our item name is that original skew won't change that's best practice let's go ahead and add it in after the fact my apologies i didn't include this in the part of the video beforehand let's do item id where the column type is going to be just some text for now and we need to pass that information along so to do that that's in the form button so i'm going to go back to my store i'm going to pick an item that i can actually purchase here like paper and then the purchase item button in this form details we're going to add one more column here at the bottom we're going to add in where the item id matches or are going to be dropped into the item id column text column that we just created right so item id to item id and now we're going to do that relation to the item id again so that way if we change the name of this item it's not going to mess up the relationship all right now to simulate that though i have to do some copying and pasting so here is the item id i'll just drag it over here so the store oh let's see here's our item id for lumber i'm going to copy that and in my transactions for the lumber will paste that item id you won't need to do this if you had done what i did previously so for linen i'm just kind of simulating the fact that we imported it here are the two for linen okay all future purchases will have this filled out automatically great all right back in our data refresh all right so transactions here's our relationship to shop so instead of using the item name we're going to use the item id it's where the item id matches the values in store item id all right and we don't need to match multiple because there's only one item of each id in the store and now we're going to look up the item image this will be a lookup into the image and then we'll do a look up of the item description all right no you're not going crazy my background just changed i had to switch scenes all right so where were we at we were creating the relationship so the item description is going to be a look up of the shop relationship to shop item description awesome we have the item image and the description now we can use these in our inventory tab so i'm going to come back here to the layout cancel inventory tab and now for image we can bring in the item image image like that look how nice that looks yes and if we want to include the description here we can it's not necessary i don't think so um you can put the title underneath like this we have enough space for it right and i think that's all you really need in your inventory right because you want to click on it to actually see the details so once we click on it now we can bring in what the details of this item are so again i'm not going to trash all this stuff and we're going to add in an image of the item okay we are going to add in the title of this item so we'll do a title field title field title field okay where we're gonna have the item name and the details can be the description like that i'm gonna do no image because we already have the image here all right and then whether or not we want to use or drop this item so to do that we can just do some simple switches so i'll do a switch here for the column will be the used so we could say use item we could say using this item [Music] will remove it from your inventory okay and we can do the same thing for drop we'll just so i cloned it and we can just change used to dropped and we'll say drop item [Music] and we'll say dropping this item we'll remove it from your inventory so if they pick one or the other it's going to drop it right or they can do both they can use it and drop it not really matter in terms of our logistics all right so let's say i'm going to use this lumber and linen i'm going to drop this linen now you see here in our inventory they're still there because we haven't built that logic yet but that logic is going to hinge on the fact that in our transactions log this used is now checked and this dropped is now checked and so now what we need to do is determine whether or not either of these two columns are true [Music] right so we're going to add a column and we're going to say used slash dropped actually let's do is in inventory this is a little bit clearer that yes true it's in your inventory or false no it's not in your inventory so we're going to do an if then else so if used is true that means it's not in our inventory so then false if dropped is true then false it's not in our inventory otherwise true it is in our inventory so you see here that the one i used and the one i dropped are marking these as false they're no longer in our inventory done [Music] okay so we only want to show the items here that are true so back in our tab we are only going to show items that are true so our inline list gonna come over here to features and we're going to filter where is in inventory is true and now we only have the items that we see right so we have uh you know the three items and if i drop one more right now we have that logic in place this should happen live right so i'm going to use this item which marks it true which turns our if then is an inventory to false it's no longer an inventory and when i hit back this item should no longer be there boop nice it's gone now we only have two items left in our inventory neat right all right so let's also now get a count of how many items we have in our inventory so to do that we need to match up the transactions here right where we're going to look for our email address that's how many total transactions we have and we're going to subtract the ones that are not in our inventory so to do that we need to match our email along with the is in inventory so we're going to do a template column to combine these two and we're going to call this uh inventory inventory count check maybe i don't know so we'll do template column we're going to match the email address so e for email and the i for is in inventory so we do e for email i for is an inventory where e stands for email and i is the is in inventory done so now i should have my email address false email address false email address true email address true email address false and now we can do is count how many times we have the email address true because these are the only two items left in our inventory so when we go to do our count we want the number two not the number five right we have five transactions but we only have two items left in the inventory so we need to make a relation from these two true two true values back to our user sheet and so we're gonna create a column that's gonna match this email address and the word true all right so back here in the users column remember back in our challenges when we created this email true we're going to lean on this again in order to check whether or not this item is still in our inventory so we already have the column for the template now we have to do a relation so we're going to do a relation to we'll call this items in inventory where a relationship that matches that email true email true email true here two transactions are inventory count check bam and then we're going to match multiple so i should have two items in that relation one two right uh and then we want to get a count of how many items we have right so we'll do a roll up we'll call this inventory count inventory couch so we're gonna do a roll up summarizing the values of our items in inventory and we'll just get some unique value this item id is fine okay by calculating the count so now we see that i have two items in my inventory whereas this has zero items in my invent for everybody else has zero because they haven't purchased anything yet all right now we get to determine how many slots you want in your inventory if you want to do uh just a set number throughout your experience they're only always going to have nine slots let's say then we can create a constant here of nine if you want this number to be flexible right i'll show you here a trick that you can use maybe so that as they level up they can get more inventory slots so here i'm going to add a column and we're going to call this uh inventory inventory slots available and this is going to be a math column and here's where you're going to put your constant so if i want 9 slots i'll do 9 minus then the items in inventory so like the letter i maybe this is going to stand for inventory count our precision is going to be just one and if we want to use units we can we can say like slots remaining right so we have seven slots remaining nine slots remaining so forth okay so this would be our constant now let's say you want to have users be able to as they level up also have an expanded inventory well the leveling up occurs in our ranks right so if we want that we have to adjust our ranks sheet so i'm going to come over here to our ranks sheet and this also say like inventory inventory boost and maybe for novice it's nothing bronze is nothing silver is nothing let's give several one sure [Music] gold [Laughter] to platinum three let's keep it at three for a minute so let's do three three and then suddenly when they get to beast mode they can have w mount six all right so this is gonna be our inventory boost so if they are of gold rank they'll have two additional slots if they are platinum diamond or legend they'll have three additional slots and if they are beast guru or master they'll have six additional slots right so maybe we start them off with six all right so that also means that we need to grab that information from our user sheet so i'm going to come over here and reload the sheet in our users tab we are going to add a column called inventory inventory boost [Music] and this is going to be a lookup of our relationship to rank and grab that inventory boost number done okay now because i am a bronze i get no inventory boost right so if i change this number to a one let's say and i refresh i should now see that my inventory boost is one [Music] there we go so now in our inventory available maybe everybody starts off with six slots right minus their inventory count but plus their boost and their boost is going to be one for me so i now have five slots remaining even though i've used up two right because i have that little inventory boost which is kind of neat [Music] maybe you also want to display what their total amount of slots possible you can do that too which would be another math column we'll call this inventory inventory possible this will be a math column where it's just the um the boost plus the six right so six plus the boost [Laughter] and this would be one we can do a unit of slots so i have a total possible seven slots but my inventory remaining possible is only five because i've already used up two okay and now we can display this information in our inventory so back to my layout now i can add on top here how many slots possible and how many slots remaining that could be just a basic table here and we can do inventory details or information oops this should be the title up there so here i have um slots [Laughter] possible [Laughter] seven slots and then i have i can do um items in inventory this will be the number of items inventory count right so the total will be slots remaining boom and maybe we want to add this above our inventory [Laughter] and so we can give us a title of inventory items [Laughter] like so if you want to add a separator we can to kind of clean things up a little bit all right so our inventory is basically done right so we have some information about our inventory we have the items themselves we can add and drop and have all those conditional checks the very last thing here will be whether or not you're able to purchase the item based on your slots remaining so back in our shop in our store we need to create one more dead button here that's going to say not enough slots or no slots available not enough inventory slots our inventory is full inventory full and this is going to appear when the user [Laughter] items remaining slots available uh equals zero so if there are slots available equals zero then they should see the cannot purchase button right that also means that their purchase button this purchase item this form button here should not appear if it's zero so we're going to add a condition where and their user slots available is greater than zero so as long as they have slots available they can purchase the item um now it's possible that they'll see two buttons here if they don't have enough rank and if they have no slots so we probably would we want to ha what should be the priority probably not enough slots right um we're not enough rank probably not enough rank because it's not even possible then if they don't if they don't have enough funds either so we'll make this not inventory full um yeah if they don't have enough funds and they don't have enough rank those buttons should appear first this inventory full should be a third button so um we're going to add a condition to where is equal zero and there can't afford is true so they can still afford it but they don't have slots and where rank enough rank is true so maybe they have the rank and they can't afford it they just have slots available so that's when that button should appear otherwise this button should not appear if can afford is false or enough rank is false those buttons should appear as the predominant cancer disabled buttons that's it and the one last thing i forgot to mention here is your inventory tab also needs to have those same visibility conditions so in the inventory i'm going to go to the tab section inventory features and we're only going to show this when profile is true so has profile is true we also want this inventory to relate to only our data or only the signed in users information so if i go back to the layout view inventory right we need to set the features and filter where the email address is the signed in user very very important otherwise i might sign in and see somebody else's inventory all right so those two things are now set and we should be good to go all right we've done it we've created our inventory we've created our shop we've done conditional checks based on rank based on cost based on inventory slots available we've done inventory boosts quite a heavy video heavy instruction i know but this is one of the most important parts i think of any gamification app is allowing your users to purchase some rewards for their experience and their efforts so hope this has helped stay tuned for part six and as always thanks for watching
Info
Channel: Robert Petitto
Views: 3,901
Rating: undefined out of 5
Keywords: wamstech, glide, glideapps, glide apps, nocode, gamification, xplap
Id: ZHky0_WzfsU
Channel Id: undefined
Length: 59min 17sec (3557 seconds)
Published: Wed Jul 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.