Plural, Singular, Who Cares?

This morning I was doing some maintenance on an old solution when I ran into this ungrammatical dialog. “I’d like to give a piece of my mind to the lazy slob who wrote that”, I said to myself smugly, followed a few seconds later by, “Uh, whoops, the slob was me.” Normally, I’m pretty good about making sure my dialog text is correct with regard to plural or singular, but in this case I must’ve been feeling particularly lazy (or overly confident that users would never export only a single record).

This is such an easy problem to solve that there’s no reason not to. Simply write the dialog text calc as follows:

"Really export " & Get ( FoundCount) & " record" &
If ( Get ( FoundCount) > 1 ; "s" ; "" ) &
" to Excel?"

That’s all there is to it… unless like many developers, you hate the idea of making the FileMaker calc engine work harder than necessary — why should it have to calculate the found count twice? — in which case your syntax will more likely look like:

Let ( fc = Get ( FoundCount ) ;
"Really export " & fc & " record" & If ( fc > 1 ; "s" ; "" ) &
" to Excel?"
)   //   end let

This is one of those thousand tiny details your users won’t be aware of, as long as you take care of it, but that can leave a negative impression if you don’t. There. Doesn’t that look nicer?

In closing I’ll just add that I never want a dialog to draw attention to itself: a simple title, clear wording, no jokes, no strange button names. I know that not all developers feel the same way, but they’re entitled to be wrong once in a while. We all are.

2 thoughts on “Plural, Singular, Who Cares?

  1. microguidance

    Hi Kevin!
    Thank you for sharing so much of your expertise. I have only just found this site and am fascinated by every article.
    I particularly enjoyed this post because this is something I also try to circumvent: you may like to see the Custom Function on
    Kind regards
    John Buckingham

    1. Kevin Frank Post author

      Thank you Jack. That is a clever and useful CF. I love the idea of solving a problem once, rather than over and over.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s