Facing the Exception Object is not set to an Instant

Hi,

I am facing the exception while using “build the Data table” using Add Data Row. Please look into the attached Xaml. Please clarify.

Thanks in Advance.
Main.xaml (12.6 KB)
Sample101.xlsx (8.9 KB)

Regards,
Harsha.

Have you populated DR?

Yes, I have added the Variable DR and system. data. data row type is specified.

Have you populated it?

You have an add data row then another add data row. Why? The first one correctly uses an array, what is the purpose of the second one? What are you trying to do?

I am using another method using Add Data Row. The first method is executed using Data Table_Array. Using Data Row Method is not able to Execute. Please Clarify.

You have to put data into your DR datarow variable.

@Harsha_S1

To clarify

If you see the locals panel in your screenshot dr ia null…

Dr is a datarow variable you created but you did not give any value to it.

What are you trying to achieve here?

Cheers

@Harsha_S1

Are you reinitializing it? Because the dr variable if you see is null when you are using it

Cheers

Hi Anil,

Please refer to the .xaml file


. I have assigned the values to the DR row .

Regards,
Harsha

@Harsha_S1

I see that…can you run in debug and do step into and see if the data is getting populated or if its getting removed always

Cheers

Could you please elaborate?

Main.xaml (13.3 KB)

Please look into the attached .xaml.

Hello @Harsha_S1

I hope you haven’t initialized the Datarow variable.

Can check the below post or move the Assign activity above to the Add Data Row activity.

(Initialise a data row and type - #2 by lakshman)

Thanks

Hi @Harsha_S1

1.right click on the first assign activity and add a break point
2. From top panel use run in debug and run the bot
3. Once the bot pauses on the breakpoint do step into activity to move from one activity to another and on every step acheck if your dr datarow ia having data

Cheers

Hi Anil,

I have tried. Still unable to clear this. Please look into the attached .xaml once and clarify with an elaborative explanation.

Thanks in Advance!!
BuildDataTableUsing_AddDataRow.xaml (10.7 KB)

@Harsha_S1

I dont see any issue …It is getting added

image

cheers

1 Like

Thanks, Anil. Thanks for your effort.

Regards,
Harsha

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.