Unable to get contents from O365 list Activity

I am using the Microsoft Office 365 Activity to access a SharePoint List.
I have used the for each list to get all of the lists within my SharePoint site, outputting the name and list ID.
I have then been able to query a particular list and return back the correct number of index’s.

What I can’t seem to do whilst using the For Each List Item command is get the contents of each item outputted. The documentation isn’t clear if you can even get the content from this command. Anyone had any experience and able to help?

Hi

Are you referring to the same as in this thread

Cheers @Joshua_Allan_0

I am using this activity ( Microsoft Office 365 - RPA Component | UiPath Marketplace)

ChosenList is the output from Get List Info and is connecting.

My Output appears as follows:
image

So its able to get the 3 items it should with the correct status as per the filter, but I just don’t know how to get the values out from the list.

Hi,

I recommend to use Dictionaty to extract content of ListItem.

First, create Dictionary<string,object> in ForEachListItem as the following

dict = ListItem.Fields.ToDictionary(Function(x) x.Name, Function(x) x.Value)

Then, for example,

dict("LinkTitle").ToString

returns value of LinkTitle.

We can also get list of key from dict.Keys

Hope this helps you.

Regards,

1 Like

@Yoichi Amazing, thanks for that! Its working.

1 Like

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