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
10 subscribers
Views
2028 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Iam preparing a grid field for tasks grid on the tempo dashboard. I need to get
saratrk
over 9 years ago
Iam preparing a grid field for tasks grid on the tempo dashboard. I need to get the data from a portal report.
If want to get the datasubset as follows,
getPortalReportDatasubset(
reportId: cons!TASKS_FOR_REQUEST_REPORTID,
pagingInfo: ri!pagingInfo,
contextIds: {},
filters: {{field: "xx", operator: "EQUAL", value: rf!reqID}}
)
Can anyone help me how to figure-out the field id value? For one of the task grid, it worked with field: "11" when i am filtering based on first field in the task report. But that 11 is not working for the first field in another report. How to figure out the field id ?
OriginalPostID-150475
OriginalPostID-150475
Discussion posts and replies are publicly visible
0
sikhivahans
over 9 years ago
@saratrk Execute the function with out any filters initially and access the 'columns' attribute in the resultant datasubset:
getPortalReportDatasubset(
reportId:
,
pagingInfo: topaginginfo(1,1),
contextIds: {
},
filters: {}
).columns
\t
The above code gives you an array where each element in the array looks like below:
[
\tlabel=
,
\tfield=
,
\talignment=
]
Here the value of the 'field' is the identifier of a column. So simply speaking, 'columns' attribute of the resultant datasubset obtained by execution of getPortalReportDatasubset should let you know about each column in the portal report.
And to add to the above, we can't expect the same values for the columns across different portal reports because as per my observations, the value of the field is assigned by the portal report object to the column (similar to auto incremented primary key) when you keep on adding columns and even existing columns will already have their own unique values already assigned. Also I have observed that the values are being assigned in an auto incremented manner and once if a value is assigned (Let's say you have added a column and Appian has given a value of 11.), the same value won't be reused even if the corresponding column is deleted.
Hope the above explanation helps you to gain idea to some extent.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saratrk
over 9 years ago
@sikhivahans: Thankyou so much. it solved my problem and saved lot of my time
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@saratrk Great!! :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
malcolm.ross
Appian Employee
over 9 years ago
To add also..
There are also some excellent examples in the Case Management Framework of this with re-usable components to make putting any portal report in SAIL a snap..
Check out the example interface rule!CASE_APP_SR_uiDashboardSRTasks using a re-usable rule called rule!CASE_APP_getPortalReportColumn
CASE_APP_getPortalReportColumn allows you to pass in any column type (text, number, date, image) from a portal report and return the proper column type in gridfield() for SAIL..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel