Skip to main content
Question

Invalid argument supplied to 'record', index '1' is invalid or out of bound.

  • December 21, 2022
  • 4 replies
  • 1797 views

Forum|alt.badge.img

如何解决这个问题

4 replies

Padmakumar
Forum|alt.badge.img+15
  • Flight Specialist | Tier 4
  • 799 replies
  • December 21, 2022

Hi @GuangRui.Z2 ,

 

Kindly share a bit more details on this like when and where you are getting this error.

 

If you are getting this while looping through an Excel file, please change the Index value to 0 as the Index in Excel file is staring from zero.


Forum|alt.badge.img+2
  • Navigator | Tier 3
  • 14 replies
  • December 21, 2022

@GuangRui.Z2 

The index you provided is not valid or there is no data at that index.

 

please check the variable if it has data and also generally index starts from 0 ..so if you have only one value then ideally index will be 0 and not 1

 

cheers


Rohit Makhaik
Forum|alt.badge.img+4

So if we are looping through a list which is fetched every time from external source, it has different number of values each time. Sometimes List has 1 value, sometimes 2 or more. I tried to verify with ‘If’ string condition to check if list[1] = empty or not but the above error is coming. How do we proceed?


Rohit Makhaik
Forum|alt.badge.img+4

Found the solution! Used List:size to fetch the number of values and used If -number condition to verify.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings