Empty datatable loses properties as outgoing argument from invoke

main → invoke workflow, in workflow create datatable(example myDt 3 columns)-> don’t add any rows → assign myDt as out argument

when checking value in main, the datatable loses the columns and I am no longer able to add rows

any fix or workaround for this? i don’t want to add an empty row because it messes up other activites

update: the same behavior can be observed by
creating datatable in main (do not add rows) → pass as argument to invoke workflow
the datatable has lost its properties in the workflow

Hi @AIV_V !
Welcome to UiPath Community Forum :smile:
I tried to do the same scenario and I am able to see the datatable with its 3 columns in the Main.xaml.
Could you please send your 2 xaml files to see ?
What is your studio version ?
DT_issue.xaml (6.2 KB)
Main.xaml (7.3 KB)
I use UiPath Studio 2022.4.3

Hello @AIV_V

if you create the argument as out or in/out and pass the value to the main.xaml, it should have all the rows. I doubt the argument is not properly mapped to the variable in the main.xaml.

Please share the screenshot of the invoke workflow and the mapping.
Thanks

Maybe in your workflow you declared your datatable as an argument (OUT) and as a variable and you initialized it with new datatable.
That would explain why your datatable is empty when coming back to Main.xaml :wink:

see screenshots below
it works as long as the DT is not empty. but if it has no rows, it loses the columns


i tried to recreate it in a fresh project but I can confirm it is normal there. i’m not sure why it is not working here. the arguments and variables are mapped correctly

Okay then:

  1. check if inside your workflow you don’t have also as a variable resultTable. If you have a variable with the same name, remove it.
  2. check if inside your main.xaml you don’t have also an argument named resultTable. If you have an argument with the same name, remove it.
  3. check if at the end of your workflow there is no assign with resultTable = new Datatable

Let us know !

1 Like

there wasn’t any

main has no arguments

no new assignations

thanks for the help everyone but
In fact, I was able to solve it by deleting the invoke workflow activity and adding a new invoke activity. then letting the arguments repopulated their values and the entire thing proceeded to work as expected

not particularly happy with this solution maybe there was some corruption or memory leak but whatever.

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