Hello ,
i am using if activity to check either a value exists in an excel file or not,
but this goes automatically to else even though the condition is true.
my condition is, if ArrayofString(0).contains(My variable).
Any help please!
Try to check the output of your variable first. If data is available, then it should work.
You may want to check if the data you are comparing has blank spaces (use String.Trim or String.TrimStart or String.TrimEnd)
i have put the variable in a log message to see oit is value and it is available,
but still have the same problem
We need to see more mate. Do you have log examples? Or code?
Actually i have used Read column and its output is variable1.
then i have used variable2= string.Join(System.Environment.NewLine,variable1)
variable3= variable2.split({âColumn_Nameâ},StringSplitOptions.RemoveEmptyEntries).
and the condition is , if (variable3(0).contains(MyValue)
Actually i have used Read column and its output is variable1.
then i have used variable2= string.Join(System.Environment.NewLine,variable1)
variable3= variable2.split({âColumn_Nameâ},StringSplitOptions.RemoveEmptyEntries).
and the condition is , if (variable3(0).contains(MyValue)
Just try using âvariable3(0).Trim.Contains(MyValue)â but first try to log the content of âvariable3(0).Trimâ and âMyValue.Trimâ.
Probably you´re assuming values⌠just double check your are comparing what you expect.
it is working with the trim.
Thank you
No problem! Just remember to Trim your variable to avoid side spaces.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.