So i would like to select multiple choices from a repeating group using a checkbox (other option would work too)
Then i would like to calculate (without doing any changes in the databse) the price of the selected items.
For example i have a table with 3 items:
Apple - price 20
Banana - price 10
Cococnut - price 3
when the user selects the items, i would like calculate the sum of the selected items
You need to use custom states. If you are not familiar with them yet, I would spend some time learning more about them, as they are incredibly useful and really step up your game in bubble.
Also, there is a youtube video by Gaby on her channel “Coaching Bubble” that is about Workflow API on list, that specifically answers your question. Check it out.
I tried that too. I am using bubble for a long time now but i could not figure out how i would use the “add to list” state.
But i was wondering if there is any option by using these checkboxes
I am not sure what is the “add to list” state you are talking about…a custom state is created by you…you will decide if it is a list or a single entry.
If you are using a list as a custom state, and a checkbox in a R.G. for items of the same datatype as the list, then you would need to reference the custom state list every time and add the current cells thing.
So the R.G. is a list of products. The custom state is a list of products.
When you check the box.
Set state_list of products…
Value is equal to “custom state product list: add current cells product”