Stack Overflow Asked by Mike - SMT on December 7, 2021
I am trying to pull data from a view I made in SharePoint and the connection works and the data is pulled but only 7 of the 10 columns are being returned. I tried both a normal GetListItems
and also using field names.
I tried different views and the ALL view and I am only getting a 7 rows. It is odd. I wonder if there is something I am missing here?
Update:
Turns out that SharePoint List has a column character limitation to 32 characters. Maybe that is causing the problem as one of the column names is for sure over 32 characters. The other columns that are missing do not appear to be over this limit so maybe not the issue but worth mentioning just in case.
import shareplum as sp
from requests_ntlm import HttpNtlmAuth
auth = HttpNtlmAuth('domain\user', 'password')
fields = ['ID', 'Task Status', 'Start Date', 'Originator of Request', 'Modified By', 'Modified',
'Final Date', 'Impacted Systems', 'Assigned To', 'Number of']
site = sp.Site('https://url.com/sites/sitename', auth=auth)
sp_list = site.List('Group tasks')
data = sp_list.GetListItems('DashData', fields=fields, row_limit=1)
headers = []
row_data = []
print(data[0])
for key, value in data[0].items():
print(key)
All I get is:
ID
Task Status
Start Date
Originator of Request
Modified By
Modified
Number of
I check the documentation on shareplum
but I was not able to find any info on this behavior.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP