I have been reading this excellent question and its answers, about collecting names from people in forms.
The best answer (the accepted one anyway) seems to be to follow the W3C's advice on personal names, which is to collect the entire full name in a single field, rather than using separate "first name" and "last name" fields.
They also describe an alternate field to ask the user "What should we call you?" - which I think is a good idea and is helpful for sending emails, displaying a welcome message, etc.
What I am struggling with is - now how do I take this information and let someone run a report using a "Last, First" name format? I would like to put a dropdown to select running the report with a default name format or this alternate format, but how do I obtain the alternate format to begin with?
According to the W3C document, I can't make any assumptions about the number of spaces in the full name, or which "name part" is considered the last name, etc. So the only thing I can come up with is to add yet another field to collect this version of the name from the user.
I don't really like that idea though, because it might be difficult to guide them to actually supply it in "Last, First" format. I can see that many users would just type the same thing in to all three fields.
Maybe there is some other intuitive or interactive design that would help?
Ultimately, I built the Name Editor UI as follows:
The options in the "Full Name" dropdown are calculated automatically with each keypress in either of the textboxes. I allow spaces in either of the textboxes, so that accounts for users with multiple given or family names.
The only validation I perform is that at least one character is entered in one of the two fields. This means that the combined "full name" will be at least one character long.
I am basically combining the given and family name fields in either order, and with or without a space. Then I reduce that to combinations that are unique (in case they don't have anything in one of the two textboxes, or if their first and last names are the same) and trim any leading or trailing spaces. So they can have 1, 2 or 4 "full names" to pick from.
In most of the application, I use just the "full name" field. But when required for sorting or for special reports, I allow the given and family names to be used separately.
I think that covers all bases? Did I miss anything?