Skip to main content
Nintex Community Menu Bar

Updating a Managed Metadata Field In SharePoint Online Using Nintex Workflow

  • February 15, 2022
  • 0 replies
  • 216 views
  • Translate

KB_Admin
Nintex Employee
Forum|alt.badge.img+8

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: **********

 

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings