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
4 replies
Subscribers
8 subscribers
Views
1547 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have into a problem with one of the Appian created rules. The rule is APN_dis
helmuta
over 10 years ago
I have into a problem with one of the Appian created rules. The rule is APN_distinct, I am using this rule to try and retrieve a set of distinct userids from a database view. The view contains multiple instances of a user but I want to display a set of unique users names based on the userids. has anyone else run into this problem? Any thoughts on what I might do differently?
Here is the section of the SAIL code:
local!resourceList: rule!APN_distinct(rule!TT_getResourcesByPM(local!pmID))...
OriginalPostID-126641
OriginalPostID-126641
Discussion posts and replies are publicly visible
Parents
0
PhilB
A Score Level 1
over 10 years ago
APN_distinct just calls the union function anyway. You should be passing in the user_id element of the CDT as you say, if that doesn't work then cast the usernames to integers (or strings, it shouldn't really matter) before using APN_distinct.
The user object can often behave strangely with some functions; isnull(), for example, will not quite work properly (it often returns true even if the user is null) so it's sometimes safer to cast the user objects to a string.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
PhilB
A Score Level 1
over 10 years ago
APN_distinct just calls the union function anyway. You should be passing in the user_id element of the CDT as you say, if that doesn't work then cast the usernames to integers (or strings, it shouldn't really matter) before using APN_distinct.
The user object can often behave strangely with some functions; isnull(), for example, will not quite work properly (it often returns true even if the user is null) so it's sometimes safer to cast the user objects to a string.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data