I am going through UI Path tutorial (11th Chapter i.e., Email Automation). i got “From, Subject, Date” in a variable & i got the data(reflects in message box). After adding those 3 variable in Input ArrowRow of “Add Data row” activity & running the workflow i am facing the below mentioned exception.
Source: Add data row
Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized).
Exception Type: NullReferenceException
Please share some light on the above scenario OR if you have similar workflow can you share it
@Suhas92
I think you created a datatable variable, but you might have missed to read an excel sheet and assign the value to DataTable Variable. Please Check once again the workflow. if every thing is fine then we can see other chances.
I saw your xaml. You are adding datarow to a DataTable. But you have not created a datatable either by using Build DataTable Activity or by reading an Excel sheet Template.
So First Build the DaTaTable then Add the DataRow.
After that Write the Excel Sheet by using WriteRange.
Change the DataType from Generic value to String
3.Remove the Default row with some value in Build DataTable.
After these many changes Try by running once again.
Even After if you are getting error means, This might be the case, Suppose if you have not received any mail with respect to the given Filter, then the list of mail messages will be empty. And you have not initialized the DataTable. So it might be reason to through the exception.
Here. I have made the changes…also I have unchecked the OnlyUnreadMessage property…
Because it might be the case that you don’t have any unread messages…so try this workflow and tell me if this works for you