Hi guys I am trying to implement an add data row activity.
So right now I want to add a data row to a table, nested inside a for each row activity in another data table. the itme to loop through is called “CurrentRow”.
I have assigned “CompositeMvmPN” with DataRow variable type, how can I assign the value of CompositeMvmPN with the currentrow of another datatable, which is being looped through? Thanks! Also, do I need to build the CompositeMvm table before the loop? Thanks!
yes you need to build,Can you explain in detail…
Thanks
1 Like
Hou_Paang_Soul:
I have assigned “CompositeMvmPN” with DataRow variable type, how can I assign the value of CompositeMvmPN with the currentrow of another datatable, which is being looped through? Thanks! Also, do I need to build the CompositeMvm table before the loop? Thanks!
Hi @Hou_Paang_Soul ,
You can try with System.String[][]
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
Regards,
LNV
1 Like
First build a datatable using “build datatable” activity
Then add data row
If you want to loop through a datatable you can use “for each row in datatable” and inside that use add data row activity
Regards,
1 Like
Vikas_M
(Vikas M)
August 3, 2023, 4:32am
5
Hey @Hou_Paang_Soul ,
U have error in your assign activity, can you please check the datatype of ComposieMvmPN in the variable panel.
The variable datatype of ComposieMvmPN should be System.Data.DataRow
Hope it helps you out!
1 Like
Anil_G
(Anil Gorthi)
August 3, 2023, 5:03am
6
@Hou_Paang_Soul
Your compositemympn is of type datarow I believe
If so in assign on right side you just need to give currentrow
Also if you pass to direct datarow it might throw error
Instead pass it like this
Currentrow.ItemArray
or CompositeMyMPN.ItemArray
in the array row field of add data row that would work
Hope this helps
Cheers
1 Like
system
(system)
Closed
August 6, 2023, 5:03am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.