I have created a datatable and want to use this datatable in another workflow. Please suggest how to do that.
Welcome to the community!!!
Pass it to inward connection in that workflow and pass it as an argument!!!
And you can use that in the workflow for the same
- Create a argument of type Datatable and the direction as IN in the workflow to which you want to pass the datatable
- Then using the edit arguments, you will get the created datatable argument there . You just assign it with the datatable you have in the main workflow
Welcome to uipath community
—hope these steps would help you resolve this
—let’s divide the session into two ways like Main workflow and Invoked workflow (another workflow)
—in main workflow you would have that datatable variable created named dt
—make sure that dt variable is created with global scope that is the whole sequence as scope in the variable panel
—now use Invoke workflow activity where we can call that another workflow
—in that workflow like how we created here a variable create there a ARGUMENT with direction as IN and variable name as in_dt and type as datatable
—now in our Invoke workflow file activity click on import arguments and pass the variable dt as value to the IN argument in_dt
—now save it
And if we want to check the arguments again click on Arguments property in the property and not the import arguments
That’s all you are done
Hope this would help you
Issue resolved. Thanks for all your time.
@0143b592934b5c8d79cf thanks for your details explanation.
I use In/Out argument for dataTable. I’m able to print the values just fine outside of the workflow (in the main) but in the workflow, I’m getting a “object not reference” error. Why would that be?