I’m having trouble with the output Variable as my dataTable doesn’t seem to capture the data of my columns in my SharePoint List.
I’m using the Sharepoint Get List Items
It gets access to my list and I can choose what items to retrieve, However, the DataTable is empty, my string variables that are suppose to capture the items within the columns = null.
Tried reading; Activities - Get List Items (uipath.com) but didn’t find my answer.
I’m thinking this has to do with my output, my type of argument, but can’t figure out what it is.
Datatable datatype is correct. There might be issue of other configuration of the activity. If you can share more details on how you configured it will be helpful to understand your issue.
Message: Column ‘I remove the correct name here for privacy reasons’ does not belong to table DataTable4.
Exception Type: System.ArgumentException
System.ArgumentException: Column ‘RemovedName’ does not belong to table DataTable4. at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at Namespace_5b6b.Main_Expressions.Main_Expressions_TypedDataContext2_ForReadOnly._Closure$__._Lambda$__17-0(DataRow currentItem)
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at UiPath.Core.Activities.ForEachBase1.InternalExecute(NativeActivityContext context)
at UiPath.Core.Activities.ForEachBase`1.StartLoop(NativeActivityContext context)
at UiPath.Core.Activities.InterruptibleLoopBase.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
After the Get List Items activity I run a log message with; String.Join(“,”, sharepointListItems.Columns.Cast(Of System.Data.DataColumn)().Select(Function(c) c.ColumnName)) and it logs my string variables as null
Are you initializing the datatable before Get List Items? If yes, then that s the problem. The activity returns a dynamic datatable, means the columns and their order varies lists to list.
I did not give it a filter, should I be filtering?
Column names to retrive do appear in the drop down and I check the ones I need for this application.
Next step is for each, with this expression in the input
→ sharepointListItems.AsEnumerable().Select(Function(currentItem) New With { .Column1 = currentItem(“Column1”).ToString(), .Column2 = currentItem(“Column2”).ToString(), .Column3 = currentItem(“Column3”).ToString(), .Column4 = currentItem(“Column4”).ToString() })
I changed the column names to numbers for posting, they have other names then 1,2,3 and 4.
for each activity is to assign each client detail into a string, this process is loggin into a service site and checking if data has been submitted and sending a report of project status based on that data. I’m trying to have it log into for each client and collecting the information I need.