Hi everyone
I’m trying to compare 2 strings
when one of them is the output of Input Dialog activity (a dropdown by string (that I seperated the options by comma in the main string)) and the other is row in DT that runs on For each row.
and now I’m trying to compare the strings and its always False
tried “.equals(var)”, tried".tostring.equals(var)", tried “.tostring.equals(var.tostring)” and also var.tostring=var2
Hi
Kindly try like this inside the for each row ACTIVITY
in a IF condition row(“yourcolumnname”).ToString.ToUpper.Contains(yourvariable.ToString.ToUpper)
still the same
and if I remember correctly the ToUpper is to make it Capital Letters (and my letters r in Hebrew - and there is no capital in Hebrew)
and also why .Contains?
please print the both comparing variable/values before comparing to verify the logic.
also use the trim function to clear the unwanted space during the comparison.
Fine
then did we try with normal contains method row(“yourcolumnname”).ToString.Trim.Contains(yourvariable.ToString.Trim) OR yourvariable.ToString.Trim.Contains(row(“yourcolumnname”).ToString.Trim)
Hi again
Now I noticed that when Im choosing one of the first dropdown options it gives me the answer for another (that have almost the same string, for example: string1: game, string2: game end (its not really the string in the project but its kind of the same))