I want to retrieve user name on the basis of first name . How can I achieve this ?
Discussion posts and replies are publicly visible
yes that would be okay...I just need a way to get the username
User will select their first and last name from drop-down based on which I have to extract user name and save it in my database. Since most of the users are not aware of username , we cannot show them in drop down. Can you please tell me a way to extract username using firstname, email or last name attributes ?
Can you use the "loggedinuser()" function so the user does not have to select their information? This function will return the userid for the user that is logged into Appian.
loggedinUser() will allow only the logged in user to be displayed. But in my case any user can be selected from dropdown
Unless First Name + Last Name is 100% unique, 100% of the time, you cannot ensure users are selecting the user they intend to select. Where are you getting the data for the array? Are all Appian users in that table?
I have created a group for users and all first and last names are unique ...is there a way or not to retrieve user name from first name ? please tell me this
Ok...the list is being generated from an Appian group? If so, make the choiceLabels a list of "First Name and Last Name" and the choiceValues the list of usernames in the Group.
a!localVariables( local!userList: getdistinctusers(cons!GLB_DEVELOPERS_GROUP),
a!dropdownField( label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", choiceLabels: a!forEach( local!userList, user(fv!item, "firstName") & " " & user(fv!item, "lastName") ), choiceValues: local!userList, saveInto: {}, searchDisplay: "AUTO", validations: {} ))
thanks a lot
No problem!