Forum Academy Marketplace Showcase Pricing Features

Help with Random Sorting on Repeating Group

Hi. I am brand new to Bubble and overall like it, just a lot of adjustment to retrain my brain where structure and terms are just very different.

While I continually struggle with properly forming the Search statements when I want to change a specific thing in which I need to feed in the Primary Key, I have found ways in my app to circumvent my issues by taking longer but still functional approaches.

However I have one thing that is driving me crazy last 8 hours, have tried numerous ways to circumvent and cant find any articles on a similar issue.

I have a repeating group that contains Text Boxes to display values from one Thing named TaskComponents. Within end of the row in the Repeating Group, I have a checkbox. This is to be an editable field by the end-user. I first took the shortcut of using auto-binding but went to manually controlling through workflow because I thought my issue was related to auto-binding but its not. So whether I take the entry made by end-user into this checkbox through auto-binding or how it currently is which is a workflow that writes the value back to the Thing, I get the same problem. It randomly re-sorts the rows in my Repeating Group as checkboxes on specific rows are set as Yes or No.

The only place I indicate any sorting criteria is when the search function is utilized to feed specific records into the Repeating Group. At that time, I indicate a field to sort by. I have looked through and nowhere else am I indicating any sorting rules. I ran the debugger and made sure no other functions/processes are running when the checkbox is utilized. Only thing that occurs is workflow which writes checkbox value back to the Thing. And its random. Sometimes I can check off 4 or 5 rows with no re-sorting and then on the 6th, some (not all) of rows re-sort. Of course the checkbox itself IS NOT used in any sorting rules so whether value is yes or no, shouldnt affect sorting.

Any idea as to what I am doing wrong?

Best,

Keith

I would start by removing all the Repeating group fields/elements and put them back in 1 at a time. After you put one in - make sure it sorts right. If it does not you’ve identified which field is causing the sorting issue.

Will try that right now. Thanks John3. Will let you know.

1 Like

John3, before I do so, I dont see any sorting options for the text boxes used in the Repeating Group. The Text Boxes are being fed Current Cell and Field Name. Below is image of properties box. So if you feel a bug somewhere they may fix itself by removing and re-adding the Text Boxes, I can still do this exercise, otherwise I dont see a property for the Text Boxes that could affect sorting at all, unless I am completely missing something.

Right - sorting’s only at the repeating group level:

In DataSource is where you can set the sorting either by doing “more” sorted by… or by clicking the little sort by box in the submenu.

Does that help?

As you can see below, I have no sorting options for the Repeating Group. This Repeating Group is being fed through a Workflow triggered by a change with a radio button element. That workflow DOES indicate sorting and when Radio Button is used and Repeating Group populates, sorting is correct. That is the ONLY place I am indicating sorting. But that workflow ONLY runs when the Radio Button is changed. I am having a change to my sorting when a Checkbox within the Repeating Group is modified. There are absolutely no sorting rules attached to that checkbox or the repeating group the checkbox is placed in.

I think you’ve answered your own question then - since you have no sorting rules with the checkbox it’s reverting to a random sort that you’ve seen.

I would recommend checking the state of the radio button group and then setting the sort in the repeating group with the checkbox so it knows what to do in your workflow.

Ah, now that makes sense! Stand-by

1 Like

Ok, the issue is resolved or appears to be. When I added an event to update the Repeating Group with the same sort instructions it was originally given when the workflow for the radio button was used, it still randomly sorted.

However in debugging I noticed the rows changes when the checkbox value itself was being written to the Thing. So I changed how this was being written. Instead of referencing the Current Cell which is in the Repeating Group, I did a Do Search For and passed in the constraints and updated the Thing that way. For whatever reason, this method does not cause Repeating Group to sort randomly. Hopefully not talking to soon :).

In any event, ok for now but curious what I was doing wrong. I may not be utilizing Bubble calls and procedures as intended but cant seem to find much help in regard to basic functions already covered, but with more complex variations. Thanks for your help with this.

K

1 Like

I found with complex it’s pretty much figuring out your own so you’re doing it right from my perspective. Great that it works now!