DEV Community

Boots
Boots

Posted on

How should you label boolean columns in a user-facing table?

I'm having one of those mornings where I'm questioning all the things.

I prototyped a table where a boolean column was labeled with "Has Alert." This means the row is associated with an action item.

I'm the only native English speaker at my job, and this label looked funny to my colleagues. Now it looks funny to me!

I started to think about boolean columns, and I reasoned that there are broadly two types, those of Being and those of Existence1:

  • Being: The row "is" or "is not" a certain way
  • Existence: The row "has" or "does not have" a property

For Being columns I usually omit the "is" in the label. E.g., if something can "be finished," I'd just write "Finished" in the column header.

For Existence columns, I'm not so sure. I thus invite you to overthink this with me 😁

How would you label an existence column? What feels natural to you?


  1. I don't desire his approval, but I feel like Heidegger would be proud of this classification 

Top comments (4)

Collapse
 
devned profile image
devned

I usually prefer the approach with prefixes as it is later on easier to scan through.

So, isCompleted over completed and hasRole over any other form e.g. containsRole (although a prefix, it is a bit longer), ...

When I see these kinds of prefixes it is a clear indicator that we are talking about booleans; whereas for "completed" we need to parse the word then conclude the type.

Collapse
 
brettimus profile image
Boots

Yes! Totally agree in computer-land, but in this case I'm talking about a table in a UI.

Collapse
 
moopet profile image
Ben Sinclair

I think that - if you want to - you can rephrase all your "existence" properties into "being" states.

What I mean is, "has alert" is the same as "is pending operator approval" or something. Maybe a little terser than that, but you get the idea.

Collapse
 
brettimus profile image
Boots

Yes! Seems like you can swap the mode of expression by using the adjective instead of the noun (and vice versa).

Like:

  • Has Flag
  • Is/Was Flagged

I guess in my case it's like

  • Has Alert
  • Is/Was Alerted

Great point!