Assign: Index and length must refer to a location within the string. Parameter name: length

Hi, my starting value is 14125(n) and the ending value is 23518(n2)
This is my code in assign

text.Substring(n,n2)

It runs finely for the first variable (n = 492, n2 = 14090) However, it gives me error in the second variable

Assign: Index and length must refer to a location within the string.
Parameter name: length

Any idea why?

Thank you xoxo

If you want to combine both variables, use

n + n2

Or
String.Format (“{0}{1}”, n,n2)

Substring is used to get the string in given position

inputString.substring(Start position, Length)

Eg: inputString = “Uipath studio”
Assign outputString = inputString.substring(7,6)

Now value of outputString = “studio”

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.