How to know if a value is user or group? And after knowing how to get User/Group details?

Hello Everyone,

I am creating a Web API (GET method) and am using a!queryprocessAnalytics to get some values from a report. One of the column in the report is Asignee and the type/Formatting for this column is 'User or Group Name'.

When i test the request i am getting a valid result but with either Group Id or username. I want to first know if the value is User or Group then convert it into First Name, Last name for User or Group name for Group.

I tried using find("[",cast(3,value),0) to know if the value is user or group but after knowing i am not able to convert the value to First Name, Last name for User or Group name for Group.

Please help me to find a solution for this.

Thank you

  Discussion posts and replies are publicly visible