How To Reset Paging info ?

Hi Everyone,

I am getting this error for paging

A grid component [label="Search results"] has an invalid value for "value" and "totalCount". "startIndex" must not be greater than "totalCount", but "startIndex" was 11 and "totalCount" was 0.

 

For Paging i am using the below code, 

a!pagingInfo(
startIndex: 1,
batchSize: 5,
sort: a!sortInfo(field: "Id", ascending: false())
)

How to Reset Paging I am not getting solution.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to minhajk0002

    Hi, Try to do something like below, this way , everytime you select anything from dropdown, your local!pagingInfo variable will refresh,

    a!localVariables(
      
      local!pagingInfo:a!pagingInfo(
        startIndex: 1,
        batchSize: 5,
        sort: a!sortInfo(field: "Id", ascending: false())
      ),
      a!dropdownField(
        label: "Dropdown",
        saveInto: {
          a!save(
            local!pagingInfo,
            a!pagingInfo(
              startIndex: 1,
              batchSize: 5,
              sort: a!sortInfo(field: "Id", ascending: false())
            )
          )
        }
      )
    )

Children