Weird Repeating Group Behavior: List gets hidden if there are 2 things in the list (Possibly A Bug)

Hey Bubblers,

For context, this app has products and shopping carts like a marketplace.

The shopping cart repeating group has been behaving weird recently. It suddenly doesn’t show the second item although it has been created in the database already.

To help you guys better visualize the scenario, the flow is simply like this:

  1. User clicks add to cart
  2. If there is an order with that product, merge the orders by simply adding to the order’s quantity
  3. If there are no orders with that product, create a new order

Note: The shopping cart RG’s data source isn’t a list but is a search wherein it searches for orders with a couple of constraints

When does the issue happen?

When the user tries to order for the first time, it all works well and the order shows up in the RG. However, when the user makes another order, it suddenly doesn’t show up in the RG although it has been created in the database already.

Refreshing the page, would completely hide the two items in the RG (the things are still in the DB though!)

How the issue suddenly solves itself

The 2 hidden items in the RG suddenly appears again if you:

  1. Create a different order with a different product to the cart making it 3 or more items
  2. Refresh the page

The issue suddenly vanishes and all the orders show up in the RG if you have 3 or more items in the RG. Trimming (deleting) it down to 2 or less than 2 items and refreshing it would make the issue appear again.

I have a group with a notification that is set to show only if repeating group is empty but it doesn’t show up while the items are hidden, explaining that the items are still there…just not visible in the UI?

image

Upon checking the debugger, it shows that the RG’s data source is empty even if the things exist in the DB!

image
image

At first, I thought this was a either a mistake in our expression or a privacy rules issue but its not. It only happens if RG’s number if items is 2 or less than 2

Also, the “hidden items”, although can be modified via search, doesn’t notify the action “trigger a custom event when data changes”

Here’s a quick loom video of the issue in action:

Would greatly appreciate any insights. Thanks!

Bumping this in case someone else is also having this issue

This is likely not a bug.

It is very difficult to give an idea of what you might have done wrong as there are no screen shots to your setup of the repeating group itself, which is where the problem is.

Likely the issue is that your are changing the Parent Group’s Shopping Cart somehow, or your OrderStatus is changing some how causing your search constraints to not have the appropriate values.

You can click onto the blue dynamic expressions in the debugger to see what the current parent groups shopping cart or orderstatus are to determine if your search constraints are correctly set when the issue is occurring. My gut tells me this is the case, especially since you have ignore empty set to no, so when one of those constraints is empty, nothing will show.

1 Like

Appreciate the reply @boston85719

The search structure is as basic as it gets

I also don’t have any workflows to change the parent group’s shopping cart container or the data source in general.

But a weird thing just happened 2 minutes ago.

For context, this user type is not able to see this thing’s created date and modified date in the privacy rules. So I played around and enabled those two and now it suddenly works?!?!

First of all, I don’t have any constraints that uses the created date and modified date as reference. But even if I did, it wouldn’t explain why the list just goes empty if I have 2 things in the list. If I have 1, it shows the order. If I have more than 2, it shows all of them.

So to validate if enabling the created date and modified date in the fields that this user could view really fixes the issue, I went ahead and turned it off, and I was right. The issue was back again — the list won’t show in the UI if the number of things are 2.

Turned it on again and it fixed the issue.

The only thing that references to the created date and modified date are the sort by fields. But then again, it doesn’t explain why the list shows perfectly fine if you have 1 item or 2+ items in the list.

I’m sure this isn’t an expected behavior so I’m convinced this is a bug.

What do you think @boston85719?

Update: Turns out that the modified field isn’t necessary. Only the the created date field is needed

Here’s a quick loom video on the issue. Please disregard the toggling of modified date field

I’m experiencing a somewhat related issue. When I click a button to create a new thing and then use the browser back button, I’m unable to view fields that were previously visible. The reason behind this is because apparently Created Date, Created By, and Modified Date are not included in my privacy rules. I reference these fields nowhere in the UI and when I refresh the page, everything works as it should again and the fields pop up with no privacy rule issues.

Did you ever figure out what was going on?