Hey All,
I would like to create a display box that shows the count of how many total applications we received. For some reason I am not getting the total count of the number of application. Any advice?
The code for the table:
a!gridField( data: queryrecord( recordType: cons!OCS_Services_Portal_Application_Record, query: a!query( aggregation: a!queryAggregation( aggregationColumns: { a!queryAggregationColumn( field: "Division", isGrouping: true ), a!queryAggregationColumn( field: "AppId", aggregationFunction: "COUNT" ) } ), pagingInfo: fv!pagingInfo ) ), columns: { a!gridColumn( label: "Division", sortField: "Division", value: fv!row.Division ), a!gridColumn( label: "Number of Applications", sortField: "AppId", value: fv!row.AppId ) }, pageSize: 20, initialSorts: {}, selectable: false, spacing: "DENSE", height: "SHORT", shadealternaterows: false)
The code for the display box:
Discussion posts and replies are publicly visible
fv!row only works within grids. Since your data is being queried in the grid, you cannot access that data from outside of the grid. See here:
https://docs.appian.com/suite/help/20.1/read-only-grid-configuration.html#manual-paging
which will store your query in a local variable. You can then use the local variable to access the appId count. It will look something like 'sum(local!myData.data.AppId)'