Skip to main content
Search Again

We think these articles could help you:

    See More
    Nintex Knowledge Base

    Updating a Managed Metadata Field In SharePoint Online Using Nintex Workflow

    Status: Validated

    TOPIC
    How to dynamically update a Managed Metadata field in SharePoint Online using a Nintex workflow.
    INSTRUCTIONS
    Note: Create all variables for use later.
    1. Open the workflow designer.
    2. Add a Regular Expression action to extract the label of the MMD field. Configure the action as follows:
      • String: {Current Item: MMD FIELD BEING COPIED_0}
      • String Operations: Replace
      • Pattern: \|(.*)
      • Replacement String:
      • Output: MMDLabel
    3. Add a Regular Expression action to extract the GUID of the MMD field. Configure the action as follows:
      • String: {Current Item: MMD FIELD BEING COPIED_0}
      • String Operation: Replace
      • Pattern: ^(.*[\\\|])
      • Replacement String:
      • Output: MMDGuid
    4. Add a Build Dictionary action to the workflow. Configure the action as follows:
      • Key: Accept
      • Type: Text
      • Value: application/json;odata=verbose
      • Output: requestHeaders 
    5. Add a Call HTTP Web Service action to the workflow. Configure the action as follows:
      • Address: {Workflow Context:Current site URL}/_api/contextinfo
      • Request Type: HTTP Post
      • Request Headers: requestHeaders (this is the variable set in step 3)
      • Request Content:
      • Response Content: responseContent 
      • Response Headers:
      • Response Status Code: responseStatusCode
    6. Add a Get An Item From A Dictionary action to the workflow. Configure the action as follows:
      • Dictionary: responseContent (this will be the variable set in step 5)
      • Item Name or Path: d/GetContextWebInformation/FormDigestValue
      • Output: FormDigestValue
    7. Add a Web Request action to the workflow. Configure the action as follows:
      • URL: {Workflow Context:Current site URL}/_api/Web/Lists/getbytitle('yourList')/items(1)
      • Method: POST
        • Content Type: application/json;odata=verbose
        • Header name (key): X-RequestDigest
        • Header value: {Variable: FormDigestValue} (this will be the variable set in step 6)
        • Header name (key): IF-Match
        • Header value: *
        • Header name (key): X-HTTP-Method
        • Header value: MERGE
      • Body: Content
        {{"TargetMMDColumn":{{"__metadata":{{"type":"SP.Taxonomy.TaxonomyFieldValue"}},"Label":"{Variable:MMDlabel}‌","TermGuid":"{Variable:MMDGuid}‌","WssId":"-1"}},"__metadata":{{"type":"SP.ListItem"}}}}
      • Username: FILL USERNAME HERE
      • Password: Value: **********
    ADDITIONAL INFORMATION
    RELATED LINKS
    • Was this article helpful?