cancel
Showing results for 
Search instead for 
Did you mean: 

Can't compare/add/multiply to unknown when using get screen bounds

Asilarow
MVP
Hi All,

I have the following design:

14010.png
The "Get Screen Offset" reader uses the "Get Screen Bounds" action on the currently active IEFrame element, and returns the collection [Active Screen Bounds]

The Choice stage has the following expressions:

X&Y = [Active Screen Bounds.Left]<0 AND [Active Screen Bounds.Top]<0
X = [Active Screen Bounds.Left]<0
Y = [Active Screen Bounds.Top]<0

The purpose of the above being to determine if the window coordinates are extending beyond the visible desktop area.

When ran, it works fine... however the validation tool highlights it as an error:

Stage: Choice1
Type: Error
Action: Validate
Description: Invalid expression for node 1 of stage 'Choice1' - Can't compare Unknown
Repairable: No

This is obviously because the collection [Active Screen Bounds] is undefined, and therefore the expression is not possible to evaluate the data type.

So... in order to attempt to remove the error, I tried to define the collection, but this results in yet another error:

Row 1 has an invalid store in location - the collection stage Active Screen Bounds has some fields defined, whereas an empty (dynamic) collection is required

Which makes it impossible to not have any error when getting screen bounds efficiently.

The only way I can see to fix this is to have yet another, separate defined collection to which all the data would have to be cast after reading the screen bounds... but this would be effectively duplicating the data without  good reason, just to resolve an error that should not exist in the first place.

Any alternative suggestions how to get around this?

This is on Blue Prism version 6.4.4 on a Corporate network.

Changing system settings for error validation is out of the question, as they are managed by corporate policy.

Kind regards,

------------------------------
Andrzej Silarow
Blue Prism Mentor
Smart Automation Services LTD
Europe/London
------------------------------
Andrzej Silarow
1 BEST ANSWER

Helpful Answers

Asilarow
MVP
Resolution found!

Using the ToNumber() function on all of the field references in expressions has resolved it:

X&Y = ToNumber([Active Screen Bounds.Left])<0 AND ToNumber([Active Screen Bounds.Top])<0

etc...


------------------------------
Andrzej Silarow
Blue Prism Mentor
Smart Automation Services LTD
Europe/London
------------------------------
Andrzej Silarow

View answer in original post

1 REPLY 1

Asilarow
MVP
Resolution found!

Using the ToNumber() function on all of the field references in expressions has resolved it:

X&Y = ToNumber([Active Screen Bounds.Left])<0 AND ToNumber([Active Screen Bounds.Top])<0

etc...


------------------------------
Andrzej Silarow
Blue Prism Mentor
Smart Automation Services LTD
Europe/London
------------------------------
Andrzej Silarow