Skip to main content
November 2, 2022
Question

I am getting this error in a!queryEntity

  • November 2, 2022
  • 3 replies
  • 0 views

Expression evaluation error at function a!queryEntity_22r2: An invalid start index of 0 was passed in. Start indices must be greater or equal to 1.

I am getting this error for the below code

pagingInfo: a!pagingInfo(
startIndex: ri!pagingInfo.startIndex,
batchSize: ri!pagingInfo.batchSize,
sort: {
a!sortInfo(field: "createdOn", ascending: false)
}
)

    3 replies

    harshitb6843
    November 2, 2022

    The error clearly tells that your start index has to be greater than 0.

    November 2, 2022

    Can I know the exact code 

    November 2, 2022

    Your rule input ri!pagingInfo.startIndex now reaches the value of 0. As explained, this is not allowed. Adjust your logic such that the value of  ri!pagingInfo.startIndex will never be lower than 1.