rk.sati
(Rakesh Sati)
October 10, 2017, 6:02pm
1
Hello,
I have a dataTable with few missing column information for e.g as below:
ColumnA ColumnB ColumC
Value1 Blank Value2
Now I have to add value in columnB which is a variable value getting from other source.
I am trying using ‘Assign’ activity as ‘‘dataTable.rows(0).item(1) = myvariable’’ but this is throwing an error stated :- “Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value(not initialized”.
Please advise
1 Like
Hello!
The Datatable is already fulfilled with information before you’re adding this new value?
Have you tried to run the Datatable through a For Each Row Activity, then use the assign with “Row.item(“Column”) = myVariable” ?
Regards,
1 Like
rk.sati
(Rakesh Sati)
October 11, 2017, 9:19am
3
No actually Column B is blank, there is no information and I have to add info there.
rk.sati
(Rakesh Sati)
October 11, 2017, 2:45pm
4
Also, I have tried row.item(“columnName”) = my variable inside for each row activity but giving me the same error… Please suggest
aksh1yadav
(AKSHAY YADAV)
October 12, 2017, 6:23am
5
hey @rk.sati
I don’t know what is going wrong at your end…
please find the attached sample for you and let me know… if still their is doubt …
Datatable col_val_assignment sample.xaml (8.1 KB)
Regards…!!
Aksh
4 Likes
rk.sati
(Rakesh Sati)
October 12, 2017, 9:32am
6
Thank you Aks!
But I am not able to download the xaml file. When I am clicking it to download, it is routing me to different page with contents as below:
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments=“x:String”>
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>System.Xml.Serialization</x:String>
</sco:Collection>
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
Please suggest if you have any idea or may this is my system issue.
aksh1yadav
(AKSHAY YADAV)
October 12, 2017, 9:35am
7
Hey @rk.sati
This has been addressed in many posts
just right click on the attachment and Save As and rename it as per your convention
Regards…!!
Aksh
system
(system)
Closed
March 19, 2019, 8:15am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.