Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
1840 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi.. I have a requirement to show 'Task Assignee' column in a Grid field
Sharmila Nagaraj
A Score Level 1
over 9 years ago
Hi.. I have a requirement to show 'Task Assignee' column in a Grid field. The Assignee can be a user, group or combination of both. Is there a way to display the user name/group name as appropriate. I have read few existing threads in the forum, but not sure if the issue was resolved.
OriginalPostID-156886
OriginalPostID-156886
Discussion posts and replies are publicly visible
0
sikhivahans
over 9 years ago
@sharmilan Hi, I have attached a code snippet which I have written recently to answer a post. I have also tested it prior to posting. You could run it quickly on your analytics data and let me know if there are any issues.
AT_getUserOrGroupDisplay.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
Alternatively you could also remove the 'index' rule input and make it accept just 'data' and thereby you can directly make use of it over any column that holds user or group data using apply().
The rule was actually built around the intentions to use it in AT_portalReportColumn similar to AT_getTaskStatusDisplay. (Reference:
forum.appian.com/.../Task_Report_Tutorial.html)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sharmila Nagaraj
A Score Level 1
over 9 years ago
Hi Srini, thanks for your reply. I have already tested your rule, and when its either the user id or group name, it returns the result correctly. When there is a combination of both, the rule does not work. i.e. "sharmilan; Group 1" should return "Sharmila Nagaraj; Appian Users Group". I hope removing index, and to have another rule to split the text if its multiple and call AT_getUserOrGroupDisplay will solve my problem. Please suggest.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@sharmilan It's not that removing index will work correctly, because accepting the entire dataset as context and thereby accessing by using index or passing each element in the dataset as context every time are completely same. The way we build the rule just differs in our requirement but the basic functionality of the rule is same. Anyhow I have uploaded other definition of the same rule removing the index rule input. Even this new definition is also tested and it works perfectly.
The rule works even when you have the data which is a combination of User and Group objects as I have tested the rule prior to posting here. I would like to suggest few things here:
1. Make sure that the column in the report hold the data of type 'User or Group' without any formatting in the report column (for example, tostring(tp!assignees) in the column definition of portal report).
2. Make sure that the column data being passed to AT_getUserOrGroupDisplay isn't flattened.
3. Make sure that the type of inputs in AT_getUserOrGroupDisplay are as per the attached snippet.
Still if you face any issues I could help you quickly if you can attach the code snippet which contains following:
1. Call to a!queryProcessAnalytics
2. The way how AT_getUserOrGroupDisplay is being invoked on the dataset obtained from a!queryProcessAnalytics
3. Inputs (and their data types) of AT_getUserOrGroupDisplay
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
Apologies, attached the file now. I assume that the rules or functions which I made use of are already present in your Appian instance.
AT_getUserOrGroupDisplay.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel