Refusing to Count

I have a security reporting app that I’m developing where I have a ReportID datatype that controls a number of other datatypes. It allows the user to fill out any number of forms on the site to create one complete report. Therefore everything is interconnected underneath the ReportID datatype.

I have a repeating group where I want to count how many of each form the user has completed. Easy enough, right? Apparently not… I’m bamboozled as to why this is refusing to count the forms. Here is my setup.

Repeating Group
RepeatingGroup

Container Data Source (each have solid references like so)
Container Data Source

Count
Count

Results on Page - there should be 4 for camera review, 2 interior patrols, 2 exterior patrols, 1 issue found, 1 awareness, and 2 audits
Results

Why does the audits one work? Well, I had to do that one a bit different because there are several different audits. So I actually do a search for those and string them together. But it’s SLOW.

The constraint for the audit should be the same effect as the other categories. I’m not understanding why it’s refusing to count. Can anyone explain this to me?

First things first, did you check your privacy rules?

No, I didn’t think I would need to worry about privacy rules for this. What do I need to be looking for here?

EDIT: ReportID is visible to everyone. So is everything else. The only thing that has any privacy rules is the User.

For things like this, I use the Debugger to find the answer by using the Inspect button on the repeating group (or a specific row in a repeating group). This will allow you to see the Searches with their actual input parameter values. I’m guessing one of these two things is the culprit:

  • The actual values that are going into the input parameters for the search are not what you expect
  • The data in the database isn’t what you expect

Hope this helps you find your answer!

I just went through the debugger. It showed me pretty much what I expected it to show. I know ReportID won’t show all the data in the repeating group, but the relationship should be there as it’s in the datatype.

I don’t know. I will keep tinkering. I have a feeling what I will have to do is do a search for the containers that hold each category and somehow do a count that way. We’ll see what I stumble into. I do appreciate you taking the time to make a suggestion! It’s something I hadn’t looked at yet.

Did you check the value of Current Users Site?

Yes, that came back correct in the debugger. In the end I decided to just bite the bullet and do a search for each field even though it’s slow (takes a second or so to return a value). I wasted what amounts to a full day on trying to work through the problem yesterday and it’s such a small detail of the overall app. In the end, I have no idea what Bubble wants from me. The only thing I can think of is Bubble has a problem with Camera, Interior, Exterior, Issue, and Awareness being set to lists under ReportID. I’m by no means an expert in Bubble. I try to do things the ‘proper way,’ but sometimes it ends up being a matter of wrestling the platform until it allows me to do what I need it to do.

EDIT: And by the way, THANK YOU for checking back in on me. I most certainly appreciate that. I was certainly tearing my hair out yesterday.

This topic was automatically closed after 70 days. New replies are no longer allowed.