Hi all, first time posting. I am trying to create a simple counter like this:
Where the user clicks on either the “+” or “-” a number of actions should occur:
When the “+” sign is clicked, the counter (0 in the middle) should increment by 1.
A new record should be added to the order (see collections below).
When the “-” sign is clicked, the counter should decrease by 1 and a record should be deleted from the order.
My current set up is a list:
The current actions I have when the “+” sign is clicked are:
The current actions I have when the “-” sign is clicked are:
I should be able to delete the current order item, but this is not an option for me to select. Not sure why?
But I’m not sure if this is correct either as nothing happens when I click the “+” or “-” button. No records are added or deleted.
I followed the instructions in this post here:
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
[WhatsApp Image 2020-05-02 at 2.27.23 AM]
But unfortunately I couldn’t get it to work for me.
I am willing to post more screenshots of my collections but I am limited as this is my first post.
Could someone please point me in the right direction to get this working?
Maybe this post is helpful,
Thanks for the answer! Wow that is quite the hack!
I think I got the logic behind it, and was trying to implement it, but i´m runnning into an issue. This third level list is not showing at first (and icons+counter not visible) because when you access the screen there is no OrderItem created yet, so nothing is shown. Do I have to create one order item per menu item at first? how would I do that? I craeted this diagram to illustrate what I understood, please tell me if im correct.
thanks for that post. I also saw that one and spent time trying to apply to my issue. But unfortunately this didn’t work also.
Can you create cloneable app of what you have been trying ?
Below that post, there is a video example.
Sure. As I am new here, I am not quite sure how to do that. Any tips you could provide or any documents on how to that you could point me towards would be great!
You can click the red arrow and share the url of your previewer.
Here is the url:
The screen where I’m stuck is the “All items 2” screen.
Please let me know if you can access it ok?
I can access it, will let you know if I make progress.
Here is the revised cloneable app,
It is in “All items 3” screen now.
@Yongki thank you so much!
But now when I go to login, I am unable to (on the clone app). Should I need to change anything for that?
Or is there a way to copy only “All items 3” to my original app?
I change the password to be just “t”.
If you want to copy paste the screen in different apps, you need to open 2 browsers for that.
But I will suggest you to create from scratch and follow along.
I will definitely do that! Thank you! I will see how it goes and come back if I can’t work it out.
Also - I have a follow up question, somewhat related. As I am new here, should I start another separate question? Is that the best approach?
Different thread for different topic is a good idea, others can help you as well.
Sorry to ask another question on this, but I forgot to include in my original post that I require the price to be updated also when an item is added (so item price * item count). E.g. if one item costs $9, then for 1 item count, cost is $9, 2 item count, cost is $18 and so on.
So in the highlighted field here:
I tried this formula:
But unfortunately this didn’t work. I am not sure which part I have got wrong?
You can add 2 more fields in order items collection and update there whenever both + icons are clicked.
It is better to prepare as much as field we want it to display or filter, rather than use formula, it doesn’t mean we avoid formula, but just displaying whatever already saved is easier.
I see, thank you!
Sorry to ask, but what 2 fields should I add? I am still new to all of this but learning quickly!
Price and Total, those that you want to display.
No worry, we are all still learning.
ah, of course!
I have now done that. However, I just found that when you click the “+” symbol, the counter goes up which is fine. But when you click on the “-” symbol and the number is reduced to 1, the entire group disappears. Is there such a way to keep it there if the item count is 1? And if the “-” is clicked again (therefore reducing the total to 0), then it disappears?
The item at top is showing quantity as 1.
Are your actions similar like these ?
It is better to support with screenshot too.
yes, apologies for missing the screenshots in the last post. I have similar:
It still disappears when the item count is 1?
On delete item, I have: