Problem with a sail report

Hello,
I have a problem with a sail report. This is my sail code
=load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20,
sort: a!sortInfo(
field: "buttonDelete",
ascending: true
)
),
a!dashboardLayout(
firstColumnContents: {
a!sectionLayout(
label: "Close Request",
firstColumnContents: {
with(
local!datasubset: queryrecord(
cons!ApacRequestMobileReport,
a!query(
selection: a!querySelection(columns: {
a!queryColumn(field: "ApacRequestMobile.ID", alias: "ID"),
a!queryColumn(field: "ApacRequestMobile.Name", alias: "Requestor"),
a!queryColumn(field: "ApacRequestMobile.LeaveCode", alias: "LeaveType"),
a!queryColumn(field: "ApacRequestMobile.ApplyDate", alias: "ApplyDate"),
a!queryColumn(field: "ApacRequestMobile.FromDate", alias: "FromDate"),
a!queryColumn(field: "ApacRequestMobile.FromTime", alias: "...

OriginalPostID-134572

OriginalPostID-134572

  Discussion posts and replies are publicly visible

Parents
  • Yes, the problem is that i forget to add the following condition in the totalCount field of the a!gridField:
    totalCount: if(local!datasubset.totalCount=0,1,local!datasubset.totalCount),
    If you don't add this condition sail generate an error when there is no record of the filter. It's very important to add a similar condition, if(local!datasubset.totalCount=0,{""},index(local!datasubset.data, "ID", null)), in every data field of your a!gridTextColumn. Obviosuly "ID" is a variabile of my process and you have to substitute it with the name of your variable
Reply
  • Yes, the problem is that i forget to add the following condition in the totalCount field of the a!gridField:
    totalCount: if(local!datasubset.totalCount=0,1,local!datasubset.totalCount),
    If you don't add this condition sail generate an error when there is no record of the filter. It's very important to add a similar condition, if(local!datasubset.totalCount=0,{""},index(local!datasubset.data, "ID", null)), in every data field of your a!gridTextColumn. Obviosuly "ID" is a variabile of my process and you have to substitute it with the name of your variable
Children
No Data