How to split string by length of 10 characters and at the nearest comma?
I have a var (string) which contains a list of number divided by commas (ex. 20,26,55,80,100,150).
I need to split it after 10 characters at the nearest “,” so that none of the values will be cut. The values in the variable will always change.
After checking some previous post on this forum, i tried with the following but i get some validation error “Cannot assign from type System.int32” to Type System.string in Assigned activity":
SplitIndex = (My_VAR.Substring(0,10).LastIndexOf(“,”)+1)
I’ve tried to set SplitIndex variable as an array.string, list.string but I get similar error .
Anyone can help with this?