Why this Exception is coming " index and length must refer to a location within the string ".
In my case its working fine in Development but not showing
error on Production. Please help me to solution .
Why this Exception is coming " index and length must refer to a location within the string ".
In my case its working fine in Development but not showing
Hey @Ajinya_jorwekar
There must be an error in the expression used in ‘Type Into’ activity.
Possibly in the Substring(). Can you please share the expression?
Also Try using inDtAdvicePdfData.Rows(0)(0).ToString.Substring()
Make sure the column index is used instead of the column name
The exception "index and length must refer to a location within the string"
in UiPath is thrown when you try to create a substring of a string that is outside of the bounds of the string. This exception can occur in UiPath for a number of reasons, including:
To avoid this exception, you should make sure that the index and length parameters of the Substring()
activity are within the bounds of the string. You can also use the IsEmpty()
activity to check if the string is empty before you try to create a substring.
HI,
For now, can you check and share content of inDtAdvicePdfData.Rows(0)("RATE").ToString
?
Probably it’s not same what you expect.
Regards,
Not recommended to use the Substring function in Type into activity.
Do the Substrings function and Store the data in a variable and pass the variable in the type into activity and try.
Hope it helps!!