Pagination in todatasubset

Certified Lead Developer

Hi Champ,

I have a map variable and the same is used in the table. So I can see it was coded as todatasubset to the map variable with a local defined pagination variable. It's working fine if the map is having less no of rows then pagination ;but getting errorrdout when it's having more rows..message says like "batc size was 0 but te largest column data array had 12 items."

So FYI: We are not using datasubset rather using todatasubset.

Regards,

Ghanashyam

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Please find the error screenshot along with the code snippet

    I just put some portion of the code needed to debug this

    a!localVariables(
    local!paginInfo:a!pagingInfo(
    startindex: 1,
    batchSize: 10
    ),
    local!mapDataSubset: a!dataSubset(
    startIndex:local!paginInfo.startIndex,
    batchSize:local!paginInfo.batchSize,
    totalCount:count(index(ri!map,"abc",{})),
    sort:a!sortInfo(
    field:"abc",
    ascending:true
    ),
    data:ri!map,
    identifiers:index(ri!map,"abc",{})
    ),
    a!gridField(
    label: "label",
    labelPosition: "ABOVE",
    data: local!mapDataSubset,
    pagingSaveInto:local!paginInfo

    )

  • 0
    Certified Senior Developer
    in reply to ghanashyamm0005

    Your batchsize is greater than the number of rows that are available. Lets say you have 10 rows in the 1st page you are trying to fetch another 10 i.e 11-20 rows which are not available in the data.

Reply Children