How to find the length of the username

I have 2 different types of accounts one with 8 in length and one with more or less than 8.
Can anyone share a sample on how to create a condition with the length set to 8 then do this if more or less then 8 then do this.
i am able to create the condition if and else but unable to get the message box to show the correct response. attached is the sample.

Hi @paramjit.tarang

did try with

Result_from_Input_Dialog.Lenght > 8 


Welcome @paramjit.tarang to the UiPath Community Forums :partying_face:

Small typo in @fernando_zuluaga’s response

*Typo - Length

But yes, you can Count the length of your string.
For String output use - yourStr.Length.ToString
For a number (Int32) output use - yourStr.Length

Hopefully this helps :blush:



1 Like

Thanks for the reply but its not working for me. here is the snapshot.

There is a typo at the yellow highlight.

It should be “Length”

can you share a snapshot on where you would add the length.

Show me the properties on the 1st activity - Input Dialog

Thanks it worked.

I had to add after ny var.To.string.Length > 8

Then it worked.

Great news.

Please mark @fernando_zuluaga’s reply as the solution :+1:



1 Like

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