shareplum
shareplum copied to clipboard
Add colums in list
Hi, I have tried to create my own template in Sharepoint and then try to use that one because i want to add data to multiple columns, but as soon as i change from: site.AddList('Test list 1, description='Great List!', templateID='Custom List') To: site.AddList('Test list 1, description='Great List!', templateID='My list template')
It says Traceback (most recent call last):
File "./fetch_deskpro_invoices.py", line 53, in
So my question is, how can i configure sharepoint so i can use a template with my own columns or can i add columns from shareplum?
Thanks / R
And when i am trying to add a column except Title, then it fails Traceback (most recent call last):
File "./fetch_deskpro_invoices.py", line 54, in
def upload_data_to_list(self):
site = self._get_site('')
new_list = site.List('My Test List')
my_data = [
{'Title': 'hello', 'Ticket id': 'Test' }
]
new_list.UpdateListItems(data=my_data, kind='New')
templateID is hard coded for the generic template's provided by Microsoft. I'm not sure if you can create a new Sharepoint site with a template that you yourself created. I'll have to look into that.
Yes that would be awesome, i guees that it would be possible to get templateid from somewhere.
Gr8 work by the way.
Brg Robin
Hey, I am stuck with a similar problem. Could you solve this one?
So I've add some Site functions to try to solve this issue: site.get_form_collection, site.get_list_templates, site.get_site_templates.
But. Alas, I don't think it can be done as far as I can see with my version of SharePoint (365). There seems to be a method GetCustomListTemplates, but I can't figure out how to get to it through the SOAP or REST API and I'm not sure you can. There seems to be a forum that suggests that this can't be done.
I see, thanks for your explanation!