Getting error while merging dataset to datatable

Hi Experts,

I hope you all are doing well. I am here with another scenario. I am trying to merge the dataset with one item only in a data table with one column only. While doing so, getting an error. I will share all the details with you.
Error Log: 23.6.1-beta.13324+Branch.release-v23.6.1.Sha.52787b786620e97cba5555379da6e6bb423b3e6b

An error occurred while calling tracking participants causing the instance to be aborted. See the inner exception for more details.

System.OperationCanceledException: An error occurred while calling tracking participants causing the instance to be aborted. See the inner exception for more details. —> System.NullReferenceException: Cannot create an L-value from the given expression with property ‘get_Item’ because the target object is null. at System.Activities.ExpressionUtilities.IndexerLocationFactory1.IndexerLocation.get_Value() at System.Activities.Location1.get_ValueCore()
at System.Activities.Tracking.ActivityStateRecord.TrackData(String name, Int32 id, ActivityInstance currentInstance, ICollection1 data, Boolean wildcard, Dictionary2& trackedData)
at System.Activities.Tracking.ActivityStateRecord.GetArguments(ICollection1 arguments) at System.Activities.Tracking.RuntimeTrackingProfile.ExtractArguments(ActivityStateRecord activityStateRecord, ActivityStateQuery activityStateQuery) at System.Activities.Tracking.RuntimeTrackingProfile.PrepareRecord(TrackingRecord record, TrackingQuery query, Boolean shouldClone) at System.Activities.Tracking.RuntimeTrackingProfile.Match(TrackingRecord record, Boolean shouldClone) at System.Activities.Tracking.TrackingProvider.FlushPendingRecordsAsyncResult.PostTrackingRecord(TrackingParticipant participant, RuntimeTrackingProfile runtimeProfile) at System.Activities.Tracking.TrackingProvider.FlushPendingRecordsAsyncResult.RunLoop() at System.Activities.Hosting.WorkflowInstance.BeginFlushTrackingRecords(TimeSpan timeout, AsyncCallback callback, Object state) at System.Activities.Hosting.WorkflowInstance.OnBeginFlushTrackingRecords(AsyncCallback callback, Object state) at System.Activities.Runtime.WorkItem.FlushTracking(ActivityExecutor executor) --- End of inner exception stack trace --- at System.Activities.ExpressionUtilities.IndexerLocationFactory1.IndexerLocation.get_Value()
at System.Activities.Location1.get_ValueCore() at System.Activities.Tracking.ActivityStateRecord.TrackData(String name, Int32 id, ActivityInstance currentInstance, ICollection1 data, Boolean wildcard, Dictionary2& trackedData) at System.Activities.Tracking.ActivityStateRecord.GetArguments(ICollection1 arguments)
at System.Activities.Tracking.RuntimeTrackingProfile.ExtractArguments(ActivityStateRecord activityStateRecord, ActivityStateQuery activityStateQuery)
at System.Activities.Tracking.RuntimeTrackingProfile.PrepareRecord(TrackingRecord record, TrackingQuery query, Boolean shouldClone)
at System.Activities.Tracking.RuntimeTrackingProfile.Match(TrackingRecord record, Boolean shouldClone)
at System.Activities.Tracking.TrackingProvider.FlushPendingRecordsAsyncResult.PostTrackingRecord(TrackingParticipant participant, RuntimeTrackingProfile runtimeProfile)
at System.Activities.Tracking.TrackingProvider.FlushPendingRecordsAsyncResult.RunLoop()
at System.Activities.Hosting.WorkflowInstance.BeginFlushTrackingRecords(TimeSpan timeout, AsyncCallback callback, Object state)
at System.Activities.Hosting.WorkflowInstance.OnBeginFlushTrackingRecords(AsyncCallback callback, Object state)
at System.Activities.Runtime.WorkItem.FlushTracking(ActivityExecutor executor)

Error Screenshot:

While debugging, the output of the dataset is appearing as
image

Please let me know if you any further details. I would be happy if you help me to solve this issue.

Thanks,
Sourav

@53410c195f64c51d98438bb2e

Try using dataset.Tables(0).CopyToDataTable

The above is just a try…but looks like the issue is something else …as per error the source looks empty…or wrong…

Instead of build datatable can you try using new datatable to initialize and then use one more assign with dtextracted = dataset.Tables(0).Clone()

Cheers

Thanks for the quick reply @Anil_G
I tried this solution but its giving me this error

I tried to use assigne activity as well, but the value is not passing there

any idea!!!

@53410c195f64c51d98438bb2e

Now I see the issue…your source should be dataset.Tables(0) and destination should be dtInvoiceExtracted…you are using reverse

cehers

1 Like

Accessing the dataset with DataSet.Tables(0) will return the table for further processing but not for value editing. Therefore you will get this L-Value exception

When the intention is as above describe then follow Anil’s advice. If it hast to be merged to the dataset contained data table, then we have to handle different

1 Like

Thanks, @Anil_G

That was an unexpected error. Thanks for the quick response. I could able to solve the issue.

Thanks,
Sourav

1 Like

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