Showing results for 
Search instead for 
Did you mean: 

Saving to SharePoint Managed Metadata columns using Patch function


This is a continuation of the 'Building PowerApps from Scratch? Use Patch!' blog. This blog shows you how you can use the Patch function to save to a SharePoint Metadata column in a list.


SharePoint list

In this example I have a simple SharePoint list which has the following two columns




The Managed Metadata column is connected to the Taxonomy Term Store.





Here is a video which walks you through how the Patch function was used in the PowerApp to save the item.



Here is the formula to save the selected item to the Managed Metadata column


    'TermGuid': DataCardValue.Selected.TermGuid,
    'WssId': DataCardValue.Selected.WssId,
    'Label': DataCardValue.Selected.Label,
    'Value': DataCardValue.Selected.Value


For this formula to work successfully PROVIDE ALL THE VALUES.

Here is the final Patch formula


Patch(ManagedMetadataTest,Defaults(ManagedMetadataTest),{Title: DataCardValue1.Text,
    'TermGuid': DataCardValue2.Selected.TermGuid,
    'WssId': DataCardValue2.Selected.WssId,
    'Label': DataCardValue2.Selected.Label,
    'Value': DataCardValue2.Selected.Value

So all that’s left is the ability to save attachments to a SharePoint list. Once that is possible, PowerApps will be a fully functional and very versatile product to build customized forms built into SharePoint Online or as an App using PowerApps website or mobile app.