Not able to pass a datatable to another xml

studio

#1

I have a xml file which intake datatable as an argument.

So by using Invoke workflow file, i’m calling that xml, with a datatable parameter passing.
In Debug mode, i could see like the table is not being passed to other xml.
Can anyone help??

Thanks in Advance!!!


#2

Could you attach a screenshot of the error message?


#3

There’s no error message as after passing the parameter, the current value of parameter is null on debugging and hence i’m not able to get values from DataTable. So, whenever i’m referring to any object in dataTable i’m getting an error like
WorkflowException


#4

Could you show me the import arguements of this invoked workflow?


#5

Hi,
I’m not able to upload xml files/ screenshot to this forum,

it’s showing a weird error like new users cannot upload attachments…i’m already logged in and was able to add attachment in previous reply.

Anyway for the invoked workflow, it’s is having an argument of direction “In” and type as “DataTable”


#6

And you have the DataTable inside the main workflow that you want to pass to this xaml file?


#7

Yes…i’m defining a datatable there and passing it as input argument to the invoked file


#8

Have you specified its value?
The DataTable you have in the main should be passed in as arguments there!
Refer to this screenshot:

Screenshot%20(112)
Screenshot (112).png1366x768 141 KB

In_dt is the In type argument in the DataTable_Display file and i’m passing in the value of the data table (dt_main) that im getting in the main.xaml file

So, make sure you supply some value in the Value Column, if you haven’t done so. :slight_smile:

Also first try to get the datatable in writeline or message box to check it its not empty!
How are you formin the data table? is it frm an excel,data scraping,or manual?
Do make sure it actually has some data before passing it.


#9

In this case, i’m actually building a dataTable and passing to the other workflow as a parameter.
And of course, i’m passing the value also. Still not able to find the root cause.

Is there anyway i could send you the xml files/Screenshots for review?
i’m quite new to this forum and i wonder why they are not allowing me to upload attachment here :expressionless:


#10

You could send me a direct message by going to my profile
Try if you can attach the xaml file there


#11

Did you try printing the datatable in the main file, before invoking the workflow and passing it as an argument?


#12


#13


#14

Please find the screenshots, @Rishabh_Lakhera


#15

Try Setting the default value of the main file data table to New System.Data.DataTable


#16

Yeah…That works :smiley:

Thanks a ton!!! @Rishabh_Lakhera


#17

Could you please mark it as a solution @AnoopMP :wink:

Thanks!
Happy Automation :slight_smile: