ppratz
(ppratz)
July 3, 2020, 1:51pm
1
Hi All,
I want to compare two variables(of type string), but it is not comparing it. Request to please help me in it.
Var1=“test” , Var2=“test”
I have tried the below
Var1.Tostring=Var2.ToString → it is not comparing the strings
Var1.Tostring equals (Var2.ToString) → it says end of expection required , so tried Var1.Tostring equals (“Var2.ToString”) → cannot convert string to boolen.
Thanks in Advance.
Hi @ppratz
Within If Activity write the condition as below
Var1.Equals(Var2)
This will definetly work
Hope this may help to solve your issue
Mark as solution if this helps you and like it
Happy Automation
Best Regards
Er Pratik Wavhal
ppratz
(ppratz)
July 6, 2020, 10:15am
3
Hi @Pratik_Wavhal
I have tried what you have mentioned but it says “Option strict on disallows implicit conversion from Boolean to string”
Hi @ppratz
It should 100% work if both the variables are of string type.
If it not working then check the variable type that are they String or not.
If they are not string then make them as string.
If then also the error is coming then if you can share your workflow here then i will understand exact what is the root cause.
Hope this may help to solve your issue
Mark as solution if this helps you and like it
Happy Automation
Best Regards
Er Pratik Wavhal
ppratz
(ppratz)
July 6, 2020, 10:24am
5
Hi @Pratik_Wavhal
But equals return the value as Boolean.
Hi @ppratz
I am taking about the variable types. I know it will return boolean.
Just try once the thing mention in the below SS :-
Hope this may help to solve your issue
Mark as solution if this helps you and like it
Happy Automation
Best Regards
Er Pratik Wavhal
1 Like
system
(system)
Closed
July 9, 2020, 11:04am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.