Pass Datatable variable to In Direction Argument in ‘Invoke Workflow File’ but it works like In\Out

Hi @loginerror

I have below mentioned 2 Xaml
1.Main
2.Test
I was pass a DT variable from Main Xaml into ‘Invoke Workflow File’ for Test Xaml In Direction DT Argument and if I add any new columns in the dt that came in through In argument then that newly added Columns are also added to the Main Xaml variable. It is working like In/Out Argument.

Below mentioned activities working like above.

Add Data Column
Merge Data Table
Add Data Row
Clear Data Table

Version details:
Studio 2022.12.0-beta.11471 - 12/20/2022
Community License
Per-user Installation
License Provider: Orchestrator
Activation ID:
Microsoft Windows 10 Pro 64-bit
6.0.7

Reference Project
Invoke_dt.zip (157.3 KB)

Thansks,
Rajkumar Durai

Hi,

It’s because the argument is passed by not value but reference when instance of class exclude primitive type is passed.
The following document will help you, to understand it in details.

Regards,

2 Likes

Hi @RajKumar_DC ,

In order to replicate the Pass By Value kind of a scenario for datatable/Reference types, You could also try passing the Datatable value like below in the arguments and it should retain the Datatable value as it is in the Main workflow.

DT1.AsEnumerable.CopyToDatatable

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