<> not working in If condition anymore?

Hi

We’ve recently updated to Studio 2021.4.4 an it seems that the if conditions has changed a bit. <> (different from) isn’t working as expected anymore?

image

Or am I missing anything?

Hi @Michaeljep

I don’t think this feature is removed from new release.
To ensure, try removing empty spaces (using StrVar.Trim) from string variable and run the code.

Something is off, and it isn’t any unexpected blank spaces.

A different example.

Could you attach the condition you have used in If statement.
Because I see expressions are combined using OR condition in visible part. If you have used AND Condition in later part, that needs to be taken care

It seems to be the multiple conditions that are failing.

If I only use Jobtype <> “VAP” then it’s working, but if I add more checks (has been working for over a year without any issues) then it fails.

So Jobtype <> “VAP” or Jobtype <> “KAL” isn’t working.

image

This is the complete expression
Jobtype <> “VAP” or Jobtype <> “KAL VÆRK” or Jobtype <> “KAL MOBIL” or Jobtype <> “KAL EKSTER” or Jobtype <> “KAL ASTECH” or Jobtype <> “HJÆLPER”

Strange. I’ll check this in my end. Meanwhile you can try below expression to perform same operation in single If Activity

Not(Jobtype.Trim.Equals(“VAP”) Or Jobtype.Trim.Equals(“KAL VÆRK”) Or Jobtype.Trim.Equals( “KAL MOBIL”) Or Jobtype.Trim.Equals(“KAL EKSTER”) Or Jobtype.Trim.Equals(“KAL ASTECH”) Or Jobtype.Trim.Equals(“HJÆLPER”))

1 Like

Your expression seems to work, however it doens’t explain why the previous condition isn’t working anymore.

Looking forward to be hearing if you experience the same.

Thanks for you help

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