Issue in Data Table

@amitkk_84

Yes, that B_DT is in main workflow. You want to call that variable inside edit_saleorder workflow by creating a variable inside it and mapping the data. Like the way how you did earlier

Ok.
Now what i am doing is that , i will be creating an arguement Out_Add_DT as shown below


If i go back to process i am nto able to see B-DT so as to map the data

@amitkk_84

You have to pass data first inside process from main and then use it for inherent workflow.

Create same argument and pass from Main to process

Hi , you need to change the type to in/out. :slight_smile:
When you do that, click import arguments in the invoke Edit_Salesorders.xaml and assign the variable you have created in the main process.

Hello Dimibot,
I have change the type as In/Out in the Edit salesorder process as shown below

Also i have declared the a variable as Data and mentioned as shown below.


But still i am not getting how B_DT will be access here.

I have did the same but still not getting it

Hi @amitkk_84 , i checked again all your screenshots to figure out what is happening in the process. As you can imagine, it is difficult to propose changes without having the entire project on our hands. Please correct if I am wrong.

  • You created a datatable B_DT in main.xaml
  • In main.xaml, you invoke process.xaml
  • Inside process.xaml you then invoke Edit_SalesOrder.xaml

You goal is to use the datatable B_DT created in main.xaml inside Edit_SalesOrder.xaml. Right?

Right now you have declared as an in/out argument In_Out_Add_Data in Edit_SalesOrder.xaml

You will need to do the same thing for process.xaml, so inside process.xaml create an in/out argument and use this argument when you are invoking Edit_SalesOrders.xaml.

In the main.xaml, when you are invoking process.xaml, assign B_DT in the argument.

I hope it is clear now :slight_smile:

Edit: I would suggest checking UiPath accademy and see how invoking/arguments works. Also try creating a simple workflow where you invoke a workflow inside another workflow and passing arguments in and out. :slight_smile:

Hello Dimibot,
Thanks for the detail explanation.
In the config file i created a workflow named as Build_Datatable and inside that i have declare an arguement as out_DT of type Datatable and direction as In/Out.
Outside the workflow i have created a variable called B_DT as a value to out_DT

  • In main.xaml, you invoke process.xaml - right
  • Inside process.xaml you then invoke Edit_SalesOrder.xaml - correct

You goal is to use the datatable B_DT created in main.xaml inside Edit_SalesOrder.xaml. Right? - Yes
I have declare arguements as per your advice but last point is where exactly can i map B_DT,
Can we have a short call to discuss which will be helpful for me as well

Hi @amitkk_84 , i don’t have time for a call.

Regarding your question: I have already mentioned it in my previous message but maybe it was not clear. In the main.xaml when you invoke process.xaml, when you click import arguments you should have the argument I told you to create. There you will map B_DT

I have made this example to demonstrate the logic behind invoking workflows and using arguments. If you run the process I have attached in debug mode and go step by step, it should be clear now what you have to do in your process.

Edit: Re-uploaded the file
Main.zip (6.4 KB)

Ok.
Thanks a lot for the information.

Hello Dimibot,
I tried following your instructions but at the time of Add data table, i am getting an error as Add Data Row: Object reference not set to an instance of an object.
Here you can see i have declare B_DT variable in the main
image

In the config i have added arguement


Similarly in the process.xaml, declaration is as follows

In the Process.xaml, invoke Edit SalesOrder.xaml i have declared below arguements.
image

Inside EditSalesOrder.xaml i have the Add Data row which is as shown below.


As you can see i am getting the error.
Can you please let me know if i am doing anything wrong.

In process.xaml argument out_add_data should have a direction in/out.

Hello Dimibot,
I changed the direction but still getting the same error.

Hi @amitkk_84 ,

You will check Build data table columns and add data row values variable type is same are not

And also you will check the in_sales_order and in_first_date values are empty or not.
In Before Add data row activity take message box or write line activity to check the values are empty or not.

Thanks a lot.
Will check that also.

Hello Navyavara,
I check the variables but still same error is coming.
image

Also please find screenshot of Q vriables.

This is the screenshot of Add Data table.

Hi @amitkk_84

Are you check in_sales-order and in_first_date values are empty are not?

Issue got resolved as one of the value was empty
Thanks a lot