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
6 replies
Subscribers
4 subscribers
Views
2048 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
123265 - no subject - Is there a way to find out what users se
Keith
over 10 years ago
Is there a way to find out what users select a person as their supervisor? It would be an organization view.
We had a username not change their supervisor and the supervisor in the profile is about three years old.
Since this was high level managers - it alerted us to this issue.
If I put my name in a report or rule - I would want to see everyone using me as their supervisor.
...
OriginalPostID-123265
Discussion posts and replies are publicly visible
0
Josh
Certified Lead Developer
over 10 years ago
Off the top of my head you could create a rule with input superToSpecify thats something like:
filter(rule!isSuper(_, ri!superToSpecify), getdistinctusers(topeople(-all users group here-))) where rule!isSuper is just supervisor(ri!user)=ri!super
There is probably a better way to do this, but hope this helps!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 10 years ago
the rule name is isSuper and you call itself. You have user and super as inputs? I only have the supervisor name. I need something to tell me the users. -all users group here- is the constant with the team called everyone?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Josh
Certified Lead Developer
over 10 years ago
Sorry if I wasn't clear, but for your first question, there are actually two rules: say getAllSupervisedEmployees() that takes in a supervisor and rule!isSuper that takes in both a supervisor and a user.
The first rule (rule!getAllSupervisedEmployees(supervisor)) could have a definition like filter(rule!isSuper(_, ri!superToSpecify), getdistinctusers(topeople(constant of all users group)))
The second rule (rule!isSuper(user, supervisor)) could have a definition like supervisor(ri!user) = ri!super
And yes, -all users group here- would be a constant pointing to the group that contains all users in the system.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 10 years ago
Thank You for your help. I was able to make this work. There is a time delay to bring back the results. We have lots of users.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Josh
Certified Lead Developer
over 10 years ago
The time delay is not surprising, I'm sure there is a quicker way to accomplish what you want, this is just a quick and easy solution.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Robert Shankin
Appian Employee
over 10 years ago
Here's essentially the same rules in slightly different notation.
See if it evaluates any faster. It may not, but no harm in checking.
rule!COMMON_userSupervisorMatch:
supervisor(ri!theUser)=ri!theSupervisor
/
rule!COMMON_subordinates:
with(
local!allUsers: getdistinctusers(topeople(ri!group))
filter(rule!COMMON_userSupervisorMatch,local!allUsers,ri!theSupervisor)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel