How is it that if I have a condition for mail.Sender IsNot Nothing, the robot jumps to the “Else” section but if I add a another condition - AND mail.Sender.ToString.Contains(sender), I get an exception? Am I supposed to use two IF statements? Sounds very disappointing… If the first condition is false and we’re using AND… he should drop immediately to the “Else” section.
What do you think? Is there a more elegant solution to this than having two IF
In my experience, if it is the case that mail.Sender is Nothing it will also try to evaluate the mail.Sender.ToString.Contains(sender) and this will throw the Null Reference Error because mail.Sender does not exist. It checks all the if cases regardless of one being wrong when used with an AND operator.
Unfortunately I’ve only really found this to be a solution:
To keep it visually clear I’ve started to use Switch Activities under the boolean evaluation so I don’t have too many nested If Activities that get messy very quickly.