Get List items by using Sharepoint

Ok then,
You can go with if condition i.e.
if {
output variable of get list items.rows.count=0
then you can give a log message or in else part if there is a record then give your process what you want to do

I am getting error while executing that GetListItems Activity. Index out of Bounds of Array. How to rectify that. I couldn’t read output value.

Hi,

Has someone tried getting selected SharePoint list columns data into Excel/CSV file? I tried using SharePointList Custom Activities package but I am getting some SharePoint metadata related columns also.
Also, if we want to get value of Microsoft.SharePoint.FieldUserValue column into Excel then how should we get that? Please help.

Hi Shalini,

I am facing the same issue, anyone can help on this?

Thanks.

Hi,
Can u try this
Initially you need to take Dictionary output and it needs to looped in for each.
In order to overcome that Microsoft issue you can do this
Microsoft.SharePoint.Client.FieldUserValue).LookupValue
If you want do print in an excel you need to add a build data table and a for each loop
i hope this can help you

Thanks

Can anyone please help me to understand how to connect to sharepoint and get list data as data table using this custom package?. i want clear explanation how to connect and how to use get list items activity. please help me to do this.

1 Like

Hi @Gopi_Arumugam ,

Firstly install the UipathTeam.sharepoint.activities package from manage packages
2. Get a share point application scope(provide username, password and URL in properties panel )
3.Drag a get list items activity and in place of List Name give the relative path from where you want to get the file and in caml query use this:

   "<Query><Where> <Eq> <FieldRef Name="+Chr(34)+"from which Column name"+Chr(34)+"/><Value Type="+Chr(34)+"Accepted"+Chr(34)+">"+Which type of records you want to get+"</Value> </Eq></Where></Query>"
  1. declare a output variable of data type datatable and use it

Hi,

Thanks for the response. In the url section do i need to provide the whole url or till …sharepoint.com. and one more doubt is it mandatory to provide CAML query even if we want all the columns in the list?. This packages is not working for me. i dont find any informative content to use these activities. Attaching screenshots below to show how i used. and for your information i have provided with test environment. username and password is valid, still not working. please help me to resolve this issue. my main requirement is, i want to read the whole list as data table.

1 Like

Hi,
In the above URL can you check by giving upto lists only
and no need of CAML query if you want to get whole data

Hi,

I have tried by providing full link and till sharepoint as well. Nothing works. I also tried by providing the web address of the list. please help me to resolve this issue.

Try list name like this:

/mysite/mysubsite/lists/mylist
or just as
/lists/mylist

The issue was with url. found the solution for it. anyway thanks a lot for your response.

Hi. I am trying to access a list too. Could you please provide an example of the solution you found to work? I am having trouble with the URLs and List links. I am getting an error saying the List cannot be found at the URL.

1 Like

Try providing the url till the module name where the list is present.

I have tried that but it does not seem to be working. If possible, could you show the URL and List Name you used in comparison to your Sharepoint? Would appreciate it

UPDATE: I have actually figured out so I am good. Thanks for the help

Hello All,

I want to get all items from sharepoint list in datatable without any filter. Can you please help me with CAML query for achieving this?

@kameshBabu @radu_bucur @bcorrea

Hi @SagarSB ,

I order to get all records there is no need to use CAML query

3 Likes

@kameshBabu Ok. Thank you

Hi,
I am using Get List Item SharePoint activity to extract require information from SharePoint list but somehow I am not able to retrieve one of the column which is having internal column name as “File” and getting error as Column ‘File’ does not belong to table.
Is there any way of retrieve those information as i am not able to delete that column and create new one.
Also i am able to filter out the list item with using field name as File in CAML query.

Hi, welcome to the community!
Before you use the File column, using debugger, inspect the return object to see all available column names.