cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot perform operation when left handed value is empty

WilliamMorgan
Level 2
Hello,

I am new and still working on BP certification exercises. In checking for the end of queue, we are instructed to check for null: Trim([Item ID])<>"" . This is sufficient to signal the que is empty yet the control room shows a tag / message indicating an exception - "cannot perform <= operation when left hand value is empty"

This doesn't seem very clean.  What is a better way to check for an empty que and not invoke an error tag in control room? 

Yes, this is probably something I have missed, but I cannot find the answer on my own.

Thank you
5 REPLIES 5

NicholasZejdlik
Level 9
I don't think it would be that particular expression that is causing the error. Are you able to check the session logs and confirm which stage the error is at? I would think the error message would different since it's doing a <> operation as opposed to a <=.

By the way, you can rewrite that particular expression as [Item ID] <> ""; no need to call Trim() on [Item ID], since it'll be empty if there's no item returned from Get Next Item, although using Trim() wouldn't cause an error.

WilliamMorgan
Level 2
Thanks Nicholas, but.....this error is a direct result of the aforementioned. I have included an image of the queue results in control room.  I am literally following BP instructions in section 4 of the BP Developer Mandatory Training "Advanced Exception Handling" All I am doing is running an exercise that checks for the end of a queue....using the exact expression from BP via the Centrix Data Solutions Sample Solution V2 - thus the Trim function that I would not really use. 

Again, the method of checking for a null item in this way is generating an error in control room (see attached image) that I don't think one would expect to see in a professional setting. This seems to be the way we are instructed to check for the end of queue. Is there a better way?

Thanks again for your help though.

WilliamMorgan
Level 2
one more attempt to upload the image

NicholasZejdlik
Level 9
It looks like the issue may be that the work queue item has blank data (the Item Key is empty in the screenshot), which is probably causing an exception during the processing of it. I'm not familiar with the training that you're going through so I'm not sure if that's intentional or not. I would force retry the exceptioned item, then run the process manually through studio so you can see exactly where it's throwing an exception.

SomashekharD
Level 3
Hi William,

Please check [Item ID] data type must be in the text while comparing with null if the data type is number/Date decision stage throws this type of errors. 

-Soma