Hi guys, I am new to UI Path and I am trying to do a substring to retrieve the last character of the string.
At present, the string is assigned as below:
author = “You searched for Author X”
I would like to extract the Author’s name → X and it is the last character of the string.
In order to do that, I would need to use substring.
First, I created a variable to store the length of the string, author.
length = author.length
Next, I did a substring as below.
authorname = author.Substring(length, length-1)
It returned an error saying that
Assign: Index and length must refer to a location within the string.
Parameter name: length
I don’t understand why I am getting this error. Can someone advise me?