I am getting list of user or groups from a ER like below
Now I want to convert this User object to username/name or email.
Or easy language I want to fetch user details from this object
Please help me
I tried user() but it gives parameter error maybe user() accepts username not user
Discussion posts and replies are publicly visible
user() is the function you want. Can you post exactly the code you tried, and the exact error message you received? Otherwise it's hard to provide help that isn't just blind guessing.
This is the list which is stored in c10 variable of process report
and I got
if I run
assuming the "list of user or group" will usually only be 1 user long, and not a sub-list... simply use a!forEach to loop over the entire list, and cast the internal result as a simple string before passing into the user() function, like this:
a!forEach(local!data.c10, user(tostring(fv!item), "firstName"))
Is it possible to get full name of the user in the similar way. Or is it possible to get First name and Last Name and concatenated with space?
The "user()" function provides the ability to get first OR last OR middle name within a single instance. Because the definition of "full name" and formatting thereof varies pretty widely and will largely depend on your use case, it will be up to you to get the one(s) you want and concatenate them together properly.
If you want to save yourself some typing in the future, create an Expression Rule i.e. "PROJ_Utility_GetUserFullName", which will call user() the necessary number of times and concatenate its results. The added benefit of this is you can null-check the input username, and even check first to make sure it represents an actual account, to avoid errors.
© 2022 Appian. All rights reserved.