a!gridColumn( label: "Assignees", sortField: "c4", value:group(fv!row.c4, "groupName") ),
Using this code in a gridfield.
Getting the data from queryprocessanalytics to populate a grid. Field c4 contains the group number. i am trying to get the corresponding group name. Pls help.
Discussion posts and replies are publicly visible
It looks like the c4 is of type User or Group. And the group function only works with Group type.
How to display the Group Name in place of Group ID in task report in interface?
The code you have attached is being used for filtering whereas the last line says that you want to show the group name instead of the group number. Both of them are separate things. I am suggesting an approach below which you can try.
a!localVariables( local!taskStatuses: { "Assigned", "Accepted", "Completed", "Not Started", "Cancelled", "Paused", "Unattended", "Aborted", "Cancelled By Exception", "Submitted", "Running", "Error", "Other", "Other", "Skipped" }, { a!gridField( label: "Read-only Grid", labelPosition: "ABOVE", data: a!queryProcessAnalytics( report:cons!LOS_TASKREPORT_CONSTANT, query:a!query( pagingInfo: fv!pagingInfo ) ), columns: { a!gridColumn( label: "Task Name", sortField: "c0", value: fv!row.c0 ), a!gridColumn( label: "Status", sortField: "c1", value: index(local!taskStatuses,(fv!row.c1+1),"Other"), align: "END" ), a!gridColumn( label: "Start Time", sortField: "c3", value: if( isnull(fv!row.c3), fv!row.c3, datetext(fv!row.c3, "default") ), align: "END" ), a!gridColumn( label: "Process Name", sortField: "c2", value: fv!row.c2 ), a!gridColumn( label: "Assignees", sortField: "c4", value:touser(fv!row.c4) ), a!gridColumn( label: "Task ID", sortField: "c5", value: fv!row.c5 ) }, validations: {} )})
Here the assignees field is displaying the User mail id OR group number. I want the User name OR the Group Name to be displayed. What do i do?