Changelog
Summary:
Improved support for SharePoint API
Here are a few examples which demonstrate how to create field and set values for a different field types:
Create a multi lookup field:
lookup_field = list.fields.add_lookup_field(title=lookup_field_name,
lookup_list_id=lookup_list.properties['Id'],
lookup_field_name='Title',
allow_multiple_values=True).execute_query()
Set a multi lookup field value
field_value = FieldMultiLookupValue()
field_value.add(FieldLookupValue(lookup_id))
updated = item_to_update.set_property(lookup_field_name, field_value).update().execute_query()
The list of methods (fields
namespace):
FieldCollection.add_url_field(title)
FieldCollection.add_lookup_field(title, lookup_list_id, lookup_field_name, allow_multiple_values)
FieldCollection.add_choice_field(title, values, multiple_values)
FieldCollection.create_taxonomy_field(name, ssp_id, term_set_id, anchor_id,field_id, text_field_id, web_id, list_id)
The list of methods (tenant
namespace):
Tenant.get_site_health_status(site_url)