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
7 subscribers
Views
3862 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 9 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
Aleksi White
Appian Employee
over 9 years ago
If you call the user() function with some sample data by itself in the expressions editor do you get the same error?
Could you attach your application-server.log?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 9 years ago
No. with same data its working fine. I am able to get list of users (userList attachment ) but when tried to show first name of user in grid second column got error.
serverlogs.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 9 years ago
filtered server log
serverlogs.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aleksi White
Appian Employee
over 9 years ago
The most recent errors I see in the logs have the following issue:
Caused by: com.appiancorp.suiteapi.common.exceptions.InvalidUserException: [InvalidUserException]
It looks like the user you are passing in is invalid. Are you storing the usernames as Text, or as User datatype?
Try wrapping the ri!username in the touser() function, which would give you
user(touser(ri!username), "firstName")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 9 years ago
i am storing it as text .. tried touser() also but it doesnt work
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 9 years ago
i have validated each username separately against firstname attributes and didnt encounter any invalid user error
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aleksi White
Appian Employee
over 9 years ago
Could you provide a screenshot of the error you are seeing as well as a screenshot of the rule getFirstName?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 9 years ago
attached..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aleksi White
Appian Employee
over 9 years ago
I did a simple test of this in my environment and was only able to recreate that error when the username did not exist in the system.
Can you confirm that none of the users have been deactivated?
Could you try testing by replacing fn!apply(rule!getFirstName(_),local!getUniqueList)) with a hardcoded list of users, something like fn!apply(rule!getFirstName(_),{"user1", "user2", "user3"}))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 9 years ago
removed all other users expect my user. but still getting same error.. If i pass static array it works always..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>