Data Transform Throwing Index Out Of Bounds Exception

While Mapping the data to UI using data transform we are getting below error.

pyTempDataPage.List(2) is not valid. Accessing invalid index 2 whereas the list has 0 elements from Requestor

Hi@karimullaN

In order to avoid this error you can check whether the list contains results or not. In order to do that you can use LengthOfPageList() function. If the value is greater than 0 the execute the step otherwise skip step.

@LengthOfPageList(pyTempDataPage.List)>0

HI @karimullaN: I hope you have a hardcoded index value in your Data transform. It is not recommended to use hardcoded index values.

Thanks.

@karimullaN

In stead of pyTempDataPage.List() am using @pxGetStepPageReference() OOTB function

and its working, not sure about the reason why indexing failing now . Its existing code.

Am using all conditions by checking length pagelist and not hardcoding the index value.

Thanks

KarimullaN

@karimullaN do you still need help with this?

If the product is not behaving as documented and you can replicate the issue, please log a support issue via the MSP and let us know the INC id here.

Alterntagively please click Accept Solution on the reply here to close the thread.