cancel
Showing results for 
Search instead for 
Did you mean: 
ChristianPanhan
Level 6
Status: New
Hi there,

with the AND and OR operators currently available the following expression throws an error when a flag data item is not set.

IsFlag([Flag Item]) AND [Flag Item]

Returns Error: ... right-hand-value is empty.

If Blue Prism would support conditional logical operators like && and || in C# repectively AndAlso and OrElse in VB.NET  the expression in this example would be valid. The evalauation of the expression would stop if IsFlag() returns False becuase the whole expression couldn't be True anyway.

We could use a single decision stage only and could use this kind of expressions in choices.

Currently there are two options:
- always set a default value for flags
- break the expression mentioned above up in two decisions and execute the second decision only if IsFlag() = True

With choices this cannot be handled easily.
2 Comments
PvD_SE
Level 12

Whilst I nowadays always set a initial value for a Flag data item, I was earlier confused how a flag apparently could be either True, False or Undefined where the latter would make my process crash as a reminder of not assigning a valid initial value to my data item.

Personally, I would opt for BP requiring me to assign a initial value when defining a new data item of type Flag.

For the same reason I'd like BP to either require a default value for numeric data items or apply initial value 0 (zero) to it.

NicholasZejdlik
Level 9

I would love to have AndAlso and OrElse in the expression editor. I've personally run into this with strings - having to break up InStr() and another condition into two separate decisions, since the other condition will fail if the specific string doesn't exist. It leads to an annoying number of decision stages, particularly if there's more than one condition to check.