Need help with my Billing Case Project

Hello I am doing a billing project and when I run UiPath it is supposed to fill an Invoice in an excel sheet using information from another excel sheet and then saves the updated invoice template file for each customer as a new excel document - customers who have been billed have dates in the column labeled “Billed.” If the field is empty, then the customer needs to be billed and the invoice should be filled.
But when I run the file it runs correctly but it also fills the Invoice for the customers who have dates in the column labeled “Billed”. Does anyone know what I am doing wrong? I think it has something to do with the if condition… (I have also tried isnullorempty)


Hi @Julia_Hronn_Petersen

Add break point at If activity and look in Locals Panel what is the value for str_Billed variable.

Also, check the str_Billed variable data type. If it is Datetime or you get its value from this date type it will have minimum date value by default when no date as assigned to it

If it is the case, you can check using this

str_Billed.Equals(DateTime.MinValue)

Cheers

Hi thank you for you answer!
The value for str_Billed variable and all the other variables is “null”
image

The variable data type for str_Billed is “string”

Thank you for sharing @Julia_Hronn_Petersen

Could you run in debug mode and use STEP IN to check the current value to better understanding when condition isn’t match when need it?