I Am Comparing this Two Strings in "if Condition" But Its not going to then block,I thinks String Size is varying

Screenshot 2022-02-24 132303 how to get this two strings in same format I mean in size So that I can run the activity in “Then Block”

hi @Gopikrishna_S

Try using trim on the both variables that you’re comparing!




Use variable.trim → This will remove extra spaces in string.

Hi as @pravin_calvin suggested go with trim option
may be an extra space is counting as one character

if you want to check total characters use


so you will understand the total count before comparing the strings


Dates should be compared with DateTime.Compare, not their string representation.

However when comparing strings I usually use the String.Equals method with .Trim and a case insensitive StringComparison. That ensures the comparison is not case sensitive and all whitespaces are removed.

String.Equals(stringA, stringB, ComparisonType)


String.Equals(str1.Trim, str2.Trim, StringComparison.OrdinalIgnoreCase)



Kind Regards

got the answer thank You

Got the annser thank you

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