Count of data field with a matching boolean

I am trying to do a count of a Bid data type that has a Hired = yes / no boolean field

I use this expression: Bid’s Hired is “yes”:count but even when there are no “Hired = yes” fields in the data the count is returning as 1.

What am I doing wrong?

Thanks

Hey @samosa :wave:

Thanks for the post and great question!

Without seeing the rest of the context, it’s hard to know for sure, but I would take a look at your number formatting and also at your privacy rules to make sure you have access to all involved fields.

Past that, if you continue to have issues consider sending a bug report so we can take a closer look. You’re also welcome to reach out to us directly at Support@Bubble.io.

Hi @Andrew.Vernon, thanks for taking a look at this.

I ended up making some changes and replaced the boolean with an option set (for an unrelated reason actually), now that it’s an option set, I set modified attribute value of 1 for yes and 0 for no, and do a sum of the values to give the count - this works.

I am still finding my way around the service, and just hacking things together… now that I am using an option set, I find I can no longer sort a repeating group by those values (as discussed in this thread: Options Sets - Can't use for dynamic sorting?). I fix one thing and something else breaks! That may sound like a complaint, but actually I find it really fun - hopefully with all this experience I’ll start to appreciate the caveats of each structure and be able to better spot problems before they come up!

Anyway thanks for your help with my query!

Hey @samosa so glad to hear you’re having fun! Great attitude to have and I tend to agree with you. That’s half the battle is just exploring and learning along the way.

Keep it up! And, don’t hesitate to reach out at Support@Bubble.io with any additional questions…

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