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
7 replies
Subscribers
5 subscribers
Views
2819 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
##PortaltoSAIL Can we use, user as a context in getPortalReportDatasubset f
janakik
over 9 years ago
##PortaltoSAIL
Can we use, user as a context in getPortalReportDatasubset function?
getPortalReportDatasubset(
reportId: cons!REPORT_ID,
pagingInfo: local!pagingInfo,
contextIds: {ri!userName},
filters: {}
)
Note: ri!userName is of type user
Thanks!
OriginalPostID-149529
OriginalPostID-149529
Discussion posts and replies are publicly visible
0
sanghapriyab
over 9 years ago
You can pass the user as a context only for Reports by User like " Processes initiated by user " or " Tasks attributed to user ".
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
janakik
over 9 years ago
Yes you are correct. Report context for my report is USER.
My question is how do i pass user as a context to getPortalReportDatasubset function. According to the documention contextIds is of type Integer array but we dont see any numeric value as a reference to a User.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
James Carter
Appian Employee
over 9 years ago
The user context is automatically populated with the user that's running the report with this function. However, please be advised that this function has been superseded by an out of the box function that allows the user context to be explicitly provided (getPortalReportDatasubset is now deprecated)
forum.appian.com/.../Appian_Release_Notes.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@janakik I guess the user can't be provided as a context, as the plugin documentation states that 'contextIds' parameter is intended for providing Group or Process or Process model ids and also mentions that 'Reports with user context will runs as the logged in user'. I feel that you can't provide user as a context here based on the documentation and the type of context.
Probably you could think of adding the user as a filter, which indirectly serves you the purpose of context.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
janakik
over 9 years ago
Thanks for the reply. Let me explain you the scenario.
Simply am using this function inside a process to check whether any tasks are assigned to the user, here by default it checks for logged in user tasks. But the process is not launched/started by the user who logged in, this is an automated process which runs on a weekly basis so process would check tasks whoever started the process(User who published the model).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
janakik
over 9 years ago
@James, We are on version 7.6. I guess a!queryProcessAnalytics() function is available in 7.8 and above.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
If you are in process then try using the "Execute Process Report Smart Service". For user based reports you can provide the context via an expression:
forum.appian.com/.../Execute_Process_Report_Smart_Service.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel