Skip to main content
Question

Extract first names from List-user field.

  • April 3, 2017
  • 0 replies
  • 77 views

A bit of a mystery to me:
The List-user field is called [Activity - Advisor]. From that field, I want to extract the first names.
When I make the formula as:
List(", ",
Left(Part(ToText(UserListToNames([Activity - Advisor])),1,";")," "),
Part(ToText(UserListToNames([Activity - Advisor])),2,";")
)
it behaves as expected, and extracts John, Jane Doo from the list-user field with values John Smith, Jane Doo.

However, when I make the formula the way I want it to, i.e.:
List(", ",
Left(Part(ToText(UserListToNames([Activity - Advisor])),1,";")," "),
Left(Part(ToText(UserListToNames([Activity - Advisor])),2,";")," ")
)
it only extracts John from above mentioned field, so QB seems to not look further for the second name; although I only added the "Left" function compared to the first formula.

What did I overlook?

Thanks!
This topic has been closed for replies.

  • Registered
  • April 3, 2017
List(", ",
Left(Trim(Part(ToText(UserListToNames([Activity - Advisor])),1,";"))," "),
Left(Trim(Part(ToText(UserListToNames([Activity - Advisor])),2,";"))," ")
)

  • Registered
  • April 3, 2017
Yoel, did that work for you?

  • Author
  • Registered
  • April 4, 2017
Hi Eric,
No unfortunately not. Both your first reply with the "FF" as well as the edited version return this error:
The types of the arguments or the number of arguments supplied do not meet the requirements of the function UserListToNames.
The function UserListToNames can be used with the following arguments:
UserListToNames (UserList ul, Text format).
UserListToNames (UserList ul).
which I also don't understand; when i look at Userlisttonames in the "All functions and operators" manual, this seems fine.

I had based my formula on the one from https://community.quickbase.com/quickbase/topics/how-to-list-first-and-last-initials-from-list-user-... (which works fine, I tested it with my user-list field), so I don't see where I made an error, or how to fix it...

  • Author
  • Registered
  • April 5, 2017
Hi Eric,
tried it again and it works. Don't know what I did different yesterday.
Thanks!