Hi Bubblers,
I can’t seem to figure out how to remove a thing from a state since the thing is in a repeating RG.
For context, I’m currently building the shopping basket page for one of our apps.
Like any other shopping basket feature, users could select products in the basket to check out. (Basically adding the products in a list of products state)
Now, there are some cases where the selected products just went out of stock. What I want to do with these products is to automatically remove them from the list of products state. However, we all know that we can’t reference things and data inside a repeating group.
There are some plugins like Orchestra that would allow us to bypass this restriction and gain access to the data inside an RG. However, these plugins are mainly for events that are action-based. I want to automatically fire my workflows using a do when condition is true
event.
Sure, we could fire these plugin events non-stop (using do every x seconds) to check if the products’ stocks are still enough but since this is a repeating group, I’m afraid that would be too inefficient and costly WU-wise.
I can’t think of any other way at the moment. I’d greatly appreciate it if you guys have any ideas or workarounds.
Cheers,