Count Fields where "Yes"

Hey all,
Looking for some help:
I have a set of 12 fields on a ‘thing’ (can we please start calling them “Objects” or “Tables”?!?)
all 12 fields are “yes/no” types. In an expression I want to count how many of them are “Yes”

Anyone have any brilliant ideas? Thanks!

You’re free to call them whatever you like…

…but thinking of Bubble ‘things’ as being synonymous with database ‘Tables’ is incorrect (in fact, they’re certainly NOT Tables… I’ve heard people suggest they be called ‘Rows’, but even that is missing some crucial understanding of what Things actually are in Bubble terms.)…

Objects might be a better choice of word, but in Bubble ‘Things’ are not synonymous with Objects either… they are a specific type of object, and there really isn’t a more appropriate or succinct word in the English language to describe them than ‘Things’…

But…to answer your question…

I have a set of 12 fields on a ‘thing’ (can we please start calling them “Objects” or “Tables”?!?)
all 12 fields are “yes/no” types. In an expression I want to count how many of them are “Yes”

Seeing as you’re using 12 individual fields for this, you’ll have to count them individually…

So, I would suggest using a series of Boolean statements formatted as a Number (1 for true, 0 for false)…

e.g.

Field 1 is yes: formatted as number [true=1, false=0] + field 2 is yes: formatted as number [true=1, false=0] + Field 3 is yes: formatted as number [true=1, false=0]

and so on, for all 12 fields.

That will give you the count of the Yes values.

1 Like

Thanks for the answer, and sending me down a rabbit hole learning about object-oriented and relational data (objects vs tables) :slight_smile:

1 Like