This is the concept.
This is a working copyable template. Not exactly a replica of what you want, but enough to get an idea of the fundamentals. You’ll probably want to copy the template because I didn’t think it works correctly in the preview.
I do actually have a copy of my shopping cart concept, but it was auto converted from a classic app, so it’s current missing some key functionality. If I have time in the next day or two, I’ll try to rework it and share a template of it.
Here’s what I’m thinking for your app:
First question I have, is if your users are signed in or not. If they are, you can utilize the user profile for some of this. If not, we’ll just need to utilize the parent table for your screen.
What you need is a new basic text column in the user table or the screen table. Let’s name it RootID. If you are using the screen table, make sure it’s a user specific column if multiple users are using the app. It does not need to be user specific if you are using the user table as each user will have their own row and will not be sharing the same row/column cell.
You will need a button with a set column action to write a Unique ID to that RootID column. This button will be your Clear/Reset button.
In your items table, add a Single Value column to display that RootID across all rows in the table.
In the items table, add a user specific basic text column and name it SelectedID.
In the items table add an IF column that compares the RootID to the SelectedID. If they match, then return you quantity column, else return 0 or blank. This is what you will display for quantity in your collection.
Change the click action in your collection to a workflow. You will want an IF branch in the workflow that checks if RootID matches SelectedID. If it does match then you only need to increment the quantity by 1. Else, if it doesn’t match, first write the RootID to the SelectedID column, followed by setting the quantity column to 1.
Your Reset Item button shouldn’t need to change.
Whenever you click the Clear/Reset button to reset everything, it will change the RootID, which will update the Single Column value on all rows and will no longer match the SelectedID, so everything will appear to be cleared because if the IF column that returns quantity or zero/blank.
For the rest of your logic to calculate the final totals and whatever else you store, you will need to include the checks to only include items where RootID matches SelectedID AND Quantity >= 1.
That should be about it. The main Clear/Reset button changes a value in a single row, but affects all of your item rows without actually updating any data in those rows. That’s the smoke and mirrors part.