Showing results for 
Search instead for 
Did you mean: 

Identify Blank Column in Collection with data type - DateTime

Level 2

Hi All,

I need to check whether in my collection one column has empty values. This column in collection has data type - DateTime. I have tried to check this by decision stage in many ways. I have tried to use:

[Collection.Data] = "" 

[Collection.Data] = "0001-01-01 00:00:00"

I always have error: "Internal : Cannot perform = operation when the left-hand value is empty"

.I need to use for that expression. Blue Prism version: 7.2



This is an issue with datetimes when they are blank you cant verify using =. You could try looping the collection and writing the value of the column to a separate data item which is set to text and then check if this is blank. Unfortunately you need to do this for every row until you find one that is blank so if you are using large datasets it could be time consuming.

Level 8


Depending upon your need, I can think of two actions in Blue Prism's Utility - Collection Manipulation VBO (you might have to download the latest from the Digital Exchange) that can help you out here.

If you are just looking to check is there is a row with an empty DateTime, you can use the Filter Collection action to derive a collection with just the empty DateTime values and count that collection to see if any rows are returned. The following Filter parameter will achieve that:


"Convert([Date Column], 'System.String')='1/1/0001 12:00:00 AM'"


If you are looking to loop through an entire collection and branch your flow if the DateTime value is empty, you can use the Append Calculated Field action to add a Flag column to your collection. 



Note: You might have to modify the default date to a format that corresponds with your Regional Settings.



Micheal Charron
Toronto, Ontario