I’m building a second app with bubble and again I’m having really weird bugs with “do a search” functionality. It’s so trivial that I must be getting something wrong here…
- I have an object “task”
- “task” has a duration in minutes (number)
- "task also can be “active” or not (yes/no)
- there is a switch that turns task active yes or no (ionic switch - auto binding)
- I show tasks in repeating block
- parent block of the repeating block shows the sum of durations of all the active tasks with the command: "Search For task’s (active-yes) length:sum
- every time I load the page, the “search” works correctly, I get the right sum
- when I start turning tasks active switches it works until then it doesn’t. Updating the sum will be very eradic. Sometimes making the task active changes the sum, sometimes it doesn’t. Very buggy. I there something that I’m doing wrong?
Thank you so much.
You could try running a reset RG action (you call it repeating block) and that would force a recalculate every time you switched a task active/inactive. The problem is that probably means creating a workflow on the switch because I 'm guessing you don’t have one if you are using auto-binding.
Thank you for the answer.
How do you do a reset repeating group? (yes I mixed the term
)
Why does such a trivial thing need a workaround or a hack to get right?
Behind all the simplicity is a hell of a lot of complexity and these things just get out of sync.
You would need to create a workflow that runs when the switch is changed. Right-click on the switch in the RG and you will see Start/Edit workflow and click that. Then add an action in the workflow and select Element Actions and from there select Display List under the Repeating Group heading (sorry I called it Reset). The Display list refreshes the contents of the RG and as far as I remember it does it instantly without being obvious. It’s like a refresh.
But … now that I’m spelling it out to you, I realise that all you probably need to do is to refresh the Parent Block/Group using the Element Action - Reset Data under Groups.
I hate having to reset things myself and I’m never quite sure what to reset but resetting a group would be more efficient than resetting an RG I would think.
That sounds like a really useful tip to make it work better. I hadn’t thought of that.
However, for me (currently at least) it still doesn’t work.
To make sure I got everything right, I created a temp button next to the group I’m trying to reset, and assigned an action to reset it manually (with the press of the button) and it still doesn’t reset it 
Hmm… did you try both the parent group and the RG? It’s rather late here so I can’t take a look tonight but if you would like to share your editor with me in a private message I can take a look for you in the morning and see if I can find the problem/solution. I’ve had similar issues before when building a long invoice so I know the problem.
1 Like