Sorting on Task Report Not Working

A Score Level 1

 I have created a task report but the sorting seems to be broken for the three columns I am showing...I am not sure what I'm missing here as I followed the tutorial and all else is working as expected:

load(
 local!pagingInfo: a!pagingInfo( startIndex: 1, batchSize: - 1),
 local!statusFilter: 4,
with(
 local!report: a!queryProcessAnalytics( report: cons!FOB_MY_TASKS_REPORT,
   query: if( local!statusFilter = 4, {},
     a!query(
       filter: a!queryFilter( field: "c5", operator: "=", value: local!statusFilter),
   pagingInfo: local!pagingInfo ))
    ),
 a!sectionLayout(
  firstColumnContents: {
    a!dropdownField(
      label: "Status",
      choiceLabels: {"All", "Accepted", "Assigned", "Completed", "Not Started"},
      choiceValues: {4, 1,0, 2, 3 },
      value: local!statusFilter,
      saveInto: { local!statusFilter, a!save(local!pagingInfo.startIndex, 1)}
       ),
   a!gridField(
     label: local!report.name,
     instructions: local!report.description,
     totalCount: local!report.totalCount,
     columns: {
      a!gridTextColumn(
         label: "Name",
         field: local!report.data.c0,
         data: index(local!report.data, "c0", {} ),
         links: apply(a!processTaskLink( task: _), index( local!report.data, "dp0", {}))
           ),
      a!gridTextColumn(
         label: "Received",
         field: local!report.columnConfigs[2].field,
         data: apply(rule!FOB_displayDate(_), index( local!report.data,"c2", {}))
           ),
     a!gridTextColumn(
         label: "Assigned To",
         field: local!report.columnConfigs[7].field,
        data: apply( rule!FOB_displayPeople(_), index( local!report.data, "c8", {} ))
         ),
},
  value: local!pagingInfo,
   saveInto: local!pagingInfo
)
}
)
)
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Gabi,
    You cannot refer the field as local!report.data.c0 because by this statement you are refering the data under the c0 but not the field name. "Field" parameter which is necessary for sorting is unable to identify the field name and so you are unable to sort on that particular field. Try replacing it in the same way as you did for the other two. hope this will help you.
Reply
  • 0
    Certified Lead Developer
    Hi Gabi,
    You cannot refer the field as local!report.data.c0 because by this statement you are refering the data under the c0 but not the field name. "Field" parameter which is necessary for sorting is unable to identify the field name and so you are unable to sort on that particular field. Try replacing it in the same way as you did for the other two. hope this will help you.
Children
No Data