I want to retrieve user name on the basis of first name . How can I achieve this ?
Discussion posts and replies are publicly visible
Hi Aman, There could be multiple people with the same first name, so the search would return multiple users, which wouldnt be the right thing to do. What is the usecase? You could use a user picker and people could type in to get the name of the user from the name
I have a drop down field from where I get user first and last name. From these 2 fields I need to retrieve username. How can I retrieve username ?
How are you getting the list of to populate the drop down? There is a plugin that can be used to search users by properties, but if more than one user is returned with the same first name and last name, that would be an issue because you cannot ensure you are selecting the correct user.
This plugin, https://community.appian.com/b/appmarket/posts/personalization-utilities, will allow you to search users by various fields.usersearch( {"firstName"}, {0}, {"Larry"})
Again, is it possible to reconsider the approach of displaying users in a dropdown, to displaying them in a user picker. The problem being, in Appian its possible to have multiple users with the same first name and last name combo, which means your search would result in multiple usernames, is that fine?
Agree
How are you getting the list of first and last names to populate the dropdowns? I agree with other posters that having a user picker is a much easier way to set this up.
I have defined an array to populate the list of users....but I want to extract the user name from first name since user(username,property) required username to be known which I dont know
user search () is not a valid function in appian 21.1
Why can you not use a userpicker field? What are you trying to accomplish with the drop down? It is a plugin that has to be added to your environment.
How are you building your array for the dropdown? Is it being queried from a table in a database?