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
8 replies
Subscribers
10 subscribers
Views
2575 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
At a record level for the related action, is there a way to capture who is actua
mjmallet
over 9 years ago
At a record level for the related action, is there a way to capture who is actually logged in?
I tried the loggedinuser() doesn't seem to work. I want to see if the person that is logged in is the creator of the record, if they are then show them the related action.
OriginalPostID-187835
OriginalPostID-187835
Discussion posts and replies are publicly visible
Parents
0
PhilB
A Score Level 1
over 9 years ago
I'm assuming this rule is called in the visibility for the related action with rp!id as an input? I believe it can be simplified - see below, maybe even moreso than that - but it might also be worth wrapping the calls to get the products in an index function so that they only return single items rather than an array of a single item.
In addition, have you tried debugging this rule by hardcoding the loggedInUser() and product to specific values to check it actually works?
=load(
local!productInfo : rule!RADARR_QR_PRODUCT_getProductByRADARRID(
ri!radarrID
),
local!projectInfo : rule!RADARR_QR_PROJECT_getProjectByProjectID(
local!productInfo.PROJECT_ID
),
if(
and(
local!productInfo.PRODUCT_STATUS = cons!RADARR_CST_productStatus[1],
or(
local!projectInfo.PROJECT_STATUS = cons!RADARR_CST_projectStatus[1],
local!projectInfo.PROJECT_STATUS = cons!RADARR_CST_projectStatus[2]
)
),
true,
and(
local!productInfo.PRODUCT_STATUS = cons!RADARR_CST_productStatus[1],
local!projectInfo.PROJECT_STATUS = cons!RADARR_CST_projectStatus[3],
local!productInfo.PRODUCT_CREATOR = fn!loggedInUser()
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
PhilB
A Score Level 1
over 9 years ago
I'm assuming this rule is called in the visibility for the related action with rp!id as an input? I believe it can be simplified - see below, maybe even moreso than that - but it might also be worth wrapping the calls to get the products in an index function so that they only return single items rather than an array of a single item.
In addition, have you tried debugging this rule by hardcoding the loggedInUser() and product to specific values to check it actually works?
=load(
local!productInfo : rule!RADARR_QR_PRODUCT_getProductByRADARRID(
ri!radarrID
),
local!projectInfo : rule!RADARR_QR_PROJECT_getProjectByProjectID(
local!productInfo.PROJECT_ID
),
if(
and(
local!productInfo.PRODUCT_STATUS = cons!RADARR_CST_productStatus[1],
or(
local!projectInfo.PROJECT_STATUS = cons!RADARR_CST_projectStatus[1],
local!projectInfo.PROJECT_STATUS = cons!RADARR_CST_projectStatus[2]
)
),
true,
and(
local!productInfo.PRODUCT_STATUS = cons!RADARR_CST_productStatus[1],
local!projectInfo.PROJECT_STATUS = cons!RADARR_CST_projectStatus[3],
local!productInfo.PRODUCT_CREATOR = fn!loggedInUser()
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data