Disp selected characters



i have string “Venkat” i need to disp only first 2 characters “Ve”

how to disp pls help me

thank you


Use string function like substring.


actually i don’t know how to write substring function in uipath
can u pls send me the substring


string str = yourStringVariable.Substring(0,2)

  1. Use Assign Activity.
  2. on the left side hit ctrl+k and give a name str.
  3. Go to down variable pane and change the str variable type to string.
  4. Assign right side ** yourStringVariable.Substring(0,2)**
  5. Write line your str variable.



check this workflowsubstring.xaml (4.9 KB)


tysm!! its working now




Just in case another person wants an alternative a .left() function will also work.This outputs a specified number of characters starting from the left hand side of the string. There is also .right() which, as you can imagine, goes from the right hand side of the string.

so instead you may want it to be


b = a.left(2) // outputs as “Ve”



@jakelewis18 Hi, it doesn’t work. There are no such functions under string


If you wnat use left method:
“variable” = Left(“variable”, “lenght”)


I tried using Assign
text = Left(“hello”, “length”)
Gives me error: Options strict on disallows implicit conversions from ‘string’ to ‘integer’


Check variable type of TEXT -> must be string

text = left(“aaaa”, 2)