Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.7k points)

In Blue Prism v5, there is a function IsFlag() which can be used to evaluate if a Data Item is of type Flag. Normally in case of e.g. a Number, the function IsNumber() will return False in case the Data Item is empty.

In my case (a Flag Data Item), the function IsFlag() does not return False when performing this expression in a decision stage.

Can someone explain me why and give a possible solution for this?

1 Answer

0 votes
by (29.5k points)

The IsFlag() does not evaluate a variable by it's type, but it evaluates by a string that you pass to it.

If you're supplying it with text variable that says "Notflag", then as it's not "true" or "false" then the function returns "false".

If you're supplying the function with flag True, then it's first changed to text "True", then it's evaluated and it is, in fact, a flag.

Finally, if you are supplying this function, with an empty flag, then it's first changed to the empty string "", which of course it's not a flag.

you can try putting the following code

[Flag] = True OR
[Flag] = False OR

Browse Categories