We have a site with a record list on a report (No Process model) as Landing page(Home). The grid has a column called "Assigned To". The data is coming from DB as Appian usernames. I am trying to display user friendly name such as first and last name (Through user() function). This works well for a Sys admin user. But when a basic user logs in he can only see his own display name but not others. For others he only sees their username.
I need a way to display full name with a basic user login.
Here is some background.
We are appian version 19.4
All related groups have appropriate security setup, with public visibility, and low privacy policy.
Discussion posts and replies are publicly visible
Can you share a sample expression for the landing page you are trying to show?
Do you have any customized Security Role Mapping in place? This can be used to control what users a particular user can see, and (as far as i know) might override the default user profile visibility setting when more restrictive settings are in place.
Where do i check the custom role mappings? FYI These are new groups created recently. I am expecting at least users within the same group should see each other's profile info.
If you run the rule retrieveusersecurityrolemap() on a username, it'll tell you their security role maps. By default i believe all of the entries are empty other than the "editorUsers" list which would contain that user's own username. I'm not sure of any quicker way to do this, but if you need to check a bunch of users fast you could probably whip up a quick SAIL interface with a user picker or something.
Something like this..
with( local!cdt: rule!getData(), a!gridLayout( labelPosition: "COLLAPSED", headerCells: { a!gridLayoutHeaderCell( label: "ID" ), a!gridLayoutHeaderCell( label: "Status" ), a!gridLayoutHeaderCell( label: "Assigned To" ) }, columnConfigs: { a!gridLayoutColumnConfig( width: "NARROW" ), a!gridLayoutColumnConfig( width: "NARROW" ), a!gridLayoutColumnConfig() }, rows: { a!forEach( items: index( local!cdt, "data", {} ), expression: a!gridRowLayout( selectionDisabled: true, contents: { /*Id*/ a!richTextDisplayField( value: a!richTextItem( text: fv!item.Id, link: a!recordLink( identifier: fv!item.Id, recordType: "recordtype" ), linkStyle: "STANDALONE" ) ), /* Status*/ a!richTextDisplayField( value: a!richTextItem( text: fv!item.status ) ), /* Assigned To*/ a!richTextDisplayField( value: a!richTextItem( text: joinarray( { user( fv!item.assignedTo, "firstName" ), user( fv!item.assignedTo, "lastName" ) }, " " ) ) ) } ) ) }, emptyGridMessage: "No records" ))
It looks like this..
[viewerUsers=, viewerGroups=1450, editorUsers=, editorGroups=63, adminUsers=, adminGroups=36]
Looks like there is a default security role map. Is there any way to change it?
The Modify User Security Smart Service is the only way that I know of - I suggest you do trial runs of it for a particular test user and then after figuring out whether that helps you, bake it into your internal user management process flow(s) if any.
Expression looks fine - I think the issue is what Mike suggested below.
Great. Thank you very much.