This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ctx = SP.ClientContext.get_current(); | |
this.user = ctx.get_web().get_currentUser(); | |
this.alerts = this.user.get_alerts(); | |
this.list = ctx.get_web().get_lists().getByTitle('Documents'); | |
ctx.load(this.user); | |
ctx.load(this.alerts); | |
ctx.load(this.list); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"viewXml": "<View Name=\"{ABEA11C2-AD01-33CD-AACD-1F5A587A0CBB}\" DefaultView=\"TRUE\" MobileView=\"TRUE\" MobileDefaultView=\"TRUE\" Type=\"HTML\" DisplayName=\"All Items\" Url=\"/sites/nameofsite/lists/Name of list/AllItems.aspx\" Level=\"1\" BaseViewID=\"1\" ContentTypeID=\"0x\" ImageUrl=\"/_layouts/15/images/generic.png?rev=47\"><Query><OrderBy><FieldRef Name=\"ID\" Ascending=\"FALSE\"/></OrderBy></Query><ViewFields><FieldRef Name=\"Title\"/><FieldRef Name=\"Created\"/><FieldRef Name=\"Modified\"/><FieldRef Name=\"MyCustomColumn1\"/><FieldRef Name=\"MyCustomColumn2\"/><FieldRef Name=\"MyCustomColumn3\"/><FieldRef Name=\"MyCustomColumn4\"/></ViewFields><RowLimit Paged=\"TRUE\">30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default=\"TRUE\">main.xsl</XslLink><Toolbar Type=\"Standard\"/><Aggregations Value=\"Off\"/></View>"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch('My Document Library Name', { | |
MyInternalLookupFieldName: { | |
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", | |
// For illustrative purposes only - you would dynamically set this... | |
Value: "", | |
Id: -1 | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch('My Document Library Name', { | |
MyInternalLookupFieldName: { | |
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", | |
Value: MyLookupComboBox.Selected.Value, | |
// Notice the only additional property is the ID for lookups (otherwise it is the same as a choice value) | |
Id: MyLookupComboBox.Selected.ID | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Where 'My Document Library Name' is the name of your document library / list | |
Patch('My Document Library Name', { | |
// Where 'MyInternalTaxonomyFieldName' is the internal name of the Managed Metadata column in SharePoint | |
MyInternalTaxonomyFieldName: { | |
// Where MyComboSelectBox is the single select combo box containing the selected choice in your Power App | |
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy", | |
TermGuid: MyComboSelectBox.Selected.TermGuid, | |
WssId: MyComboSelectBox.Selected.WssId, | |
Label: MyComboSelectBox.Selected.Label, | |
Path: MyComboSelectBox.Selected.Path, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch('My Document Library Name', { | |
MyInternalChoiceFieldName: { | |
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", | |
// Where 'MyChoiceComboBox' is the single select combox box in your Power App | |
Value: MyChoiceComboBox.Selected.Value | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You get the idea... | |
ForAll( | |
MyComboMultiSelectBox.SelectedItems, | |
Collect( | |
ChoiceValuesFromComboBox, | |
{ | |
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", | |
Value: Value | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First of all we need to loop through each of the selected items in the combo box... | |
ForAll( | |
// Where 'MyComboMultiSelectBox' is your multi select combox box containing the selected items... | |
MyComboMultiSelectBox.SelectedItems, | |
Collect( | |
// Create a new collection called TaxonomyValuesFromComboBox | |
TaxonomyValuesFromComboBox, | |
{ | |
// Create a new entry in the collection for each of the selected items... | |
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/_api/web/GetList(@a1)/Views(@a2)/SetViewXml()?@a1=%27%2Fsites%2Fmycustomsite%2FLists%2FMy%20List%27&@a2=%27aaeb6c8a%2Dd013%2D41ec%2D9e44%2Db39b203d0caf%27 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content-type: application/json;odata=verbose | |
accept: application/json;odata=verbose |
NewerOlder