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
17 replies
Subscribers
8 subscribers
Views
4523 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Use Case:- We have created three custom group which are present in one group ty
vineeta6579
over 10 years ago
Use Case:- We have created three custom group which are present in one group type. I need to get list of all users present in my group type. I am able to get list of users but when I am trying to get attributes of users it throws below error.
"Invalid function user"
Please find attached report code..
Sail Report
OriginalPostID-143057
OriginalPostID-143057
Discussion posts and replies are publicly visible
0
Conor Cahill
Certified Lead Developer
over 10 years ago
I would get the overall userlist doing this:
local!allUsers: reduce(fn!append,touser({}),apply(fn!GetUserList,local!getGroupIdfromGroupType))
local!getUniqueUsers: union(local!allUsers,local!allUsers)
My guess is that your parsing is causing some extra text or characters to get into the username strings. The above method removes the need to do the parsing.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
what is fn!GetUserList ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
ignore previous comment
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 10 years ago
rule!GetUserList, sorry about that
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
if there is no user inside custom group then the output would be like below..
; ; ; ; vahluwalia; ; ; ; ; ; vahluwalia; ; ; vahluwalia; ;
I need to remove single or multiple occurrence of ;
The code provided you doesn't work on this situation
local!allUsers: reduce(fn!append,touser({}),apply(fn!GetUserList,local!getGroupIdfromGroupType))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 10 years ago
ah, So for the get unique users you could try something like this:
local!getUniqueUsers: reject(fn!isnull,union(local!allUsers,touser({})))
this way you would both get the set of unique users, while at the same time removing the null values.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
thanks conorc and Ale its working now..
i was able to remove coinsurance of ; by split function
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<