Issue configuring ‘Columns to retrieve’ in Get List Items activity (SharePoint)

Hello everyone!

I’m having a small issue configuring the Get List Items activity (UiPath.MicrosoftOffice365.Activities.Sharepoint.GetListItems). In the version of the activity I’m using, it is necessary to fill in the “Columns to retrieve” property and, no matter how I try to do it, I keep getting this error → Get List Items: Column “Title” could not be found.

First, I use a Get List Info activity to get the information about the SharePoint list I want to query, and I get this:

Office365SharepointList { 
  Columns = Office365SharepointListColumn[156] { 
    Office365SharepointListColumn { 
      Choice = null, 
      ColumnGroup = "Columnas personalizadas", 
      Description = "", 
      DisplayName = "Título", 
      EnforceUniqueValues = false, 
      Guid = [...], 
      Hidden = false, 
      Id = "...", 
      Indexed = true, 
      IsRequired = false, 
      LookupColumn = null, 
      LookupListId = null, 
      Name = "Title", 
      PersonOrGroup = null, 
      ReadOnly = false, 
      Required = false, 
      Sample = ColumnSample { Value = null }, 
      Type = Text 
    }, 
    Office365SharepointListColumn { 
      Choice = null, 
      ColumnGroup = "Columnas personalizadas", 
      Description = "", 
      DisplayName = "...", 
      EnforceUniqueValues = false, 
      Guid = [...], 
      Hidden = false, 
      Id = "3a6b296c-3f50-445c-a13f-9c679ea9dda3", 
      Indexed = false, 
      IsRequired = false, 
      LookupColumn = null, 
      LookupListId = null, 
      Name = "ComplianceAssetId", 
      ...
    }
    ...
  } 
}

And so on for all columns in the list (there are 156).
I tried creating an IEnumerable<String> variable to get the column names like this:
listItems.Columns.Select(Function(c) c.Name) but even though the names match the "Name" field, and even after trying different options, the error saying that the column does not exist still appears.

To verify that the SharePoint access is correct, I tried other activities and, for example, using For Each List Item I can retrieve all fields, but I have to go item by item, and I’d prefer to extract all items that match the filter at once.

Does anyone know how I can get the information using Get List Items or how I should properly configure the activity by filling in the “Columns to retrieve” property?

Thanks in advance!!

@agueda.prieto

Could you please try with DisplayName instead?

{“Titulo”}

Also, have you tried fetching other columns? Does it work for other columns? Or it throws error to all column?

Also if you leave the column field empty it will fetch all columns present in the list. Have you tried the same?

2 Likes

You’re right! I changed this:

listItems.Columns.Select(Function(c) c.Name)

to this:

listItems.Columns.Select(Function(c) c.DisplayName).Distinct()

And now it returns the information I need! I couldn’t leave the “Columns to retrieve” field empty because it would throw an error saying that this property must have a value (You must provide a value for this property...), so I needed to find a way to extract the column names.

Thank you so much!

1 Like

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