Background
In one of my recent projects, we were building a Reusable Nintex Workflow and one of the steps was to update managed metadata field. To our surprise we found that even Nintex 2013 Workflow does not have any action to update the managed metadata. There are workaround by using webservice and Term Guid but that was not an ideal solution for us.
Some of our requirements
- We want to update one or many managed metadata fields in the workflow. The value of the field will be determined by the outcomes of other workflow steps.
- We cannot hardcode Term GUID in the workflow. We have automated ways to deploy our workflow (through scripts) and it goes through few environments (Dev, System Integration, UAT, Prod-Support) before it goes to production. In each environment the Term GUID will be different.
- Easy to use. Same methodology will be used in different workflows in different projects. So it must be easy to use, intuitive option.
- Storing user credential was not an option.
Solution: Nintex Workflow Custom Action
What can be more easier way than to drag an action into the workflow designer and configure the field name and Managed Metadata value? So I develop a Nintex Workflow Custom Action, “Taxonomy Update”. Below I am providing the ready to use solution and instruction to use the action. Hope others might find it useful.
Deploying Nintex Workflow Custom Action (3 Steps)
- Download the Cassini.Workflows.wsp
This is free to use for personal or business projects. The solution has been deployed and tested in enterprise level. I have not posted the source code yet (something I might do in future).
- Deploy the wsp in SharePoint farm.
You can use the following Powershell commands to deploy the wsp.
Add-SPSolution Cassini.Workflows.wsp
Install-SPSolution –Identity Cassini.Workflows.wsp -GACDeployment
- Activate the WebApplication feature (Cassini.NW.CustomActions)
Go to Central Admin > Application Management> Manage web applications> Select the Web application you want to use the Custom Action> Click Manage feature form the Ribbon > Activate Cassini.NW.CustomActions feature.
Using/Configuring Taxonomy Update Action
- Create a new Nintex workflow or open an existing Nintex workflow.
- Add “Taxonomy Update”
In the left ToolBox, you will see a new option “Cassini Custom Actions”. If you click that you will find the newly installed action “Taxonomy Update”. Drag the action into the canvas.
- Configure
Double click on the newly added action to configure. In the Taxonomy Field Name enter the name of the field/column in that document library/list that you want to update. In the Field Value enter the full path of the term separated by pipe (|).
So if you are updating a managed metadata field called “Document Status”, the value of Taxonomy Field Name will be Document Status.
If you are setting the value to a term named “Approved” that resides in Taxonomy Term Store “Managed Metadata Service”, Term Group “Cassini” and Term Set “Document Status”, then the full path will be: “Managed Metadata Service|Cassini|Document Status|Approved”.You can also select sub term e.g. “Managed Metadata Service|Cassini|Document Status|Finalised|Archived”.
The solution package can be found here Cassini.Workflows.zip
Hope this helps!
Awesome post ! I am sure it will help a lot of people!
Thanks! 🙂
Very interesting.
Would it be possible to use Workflow-variables as Input-values?
Hi Karl, sorry about the late reply. Somehow I didn’t get any notification for your comment.
Yes, you can use workflow variable. In both field name and field value you can include reference variables like other Nintex WF OOTB control.
No..you can’t.
Excellent website. A lot of helpful info here. I’m sending it to a few pals ans additionally sharing in delicious. And of course, thanks to your sweat!
Thanks Corburt
It is not possible to set the MMS-Column with the NINTEX Column Picker like {ItemProperty:IPI_CompanyLocation} ,
also it is not possible to use the Columns DisplayName “Standort” or the Internal Field Name “IPI_CompanyLocation”
The SP2013 TraceLog is:
01/03/2017 11:29:05.12 w3wp.exe (0x6AF4) 0x1058 Nintex Workflow 2013 General 00000 Unexpected Error occured whild updating ‘{ItemProperty:IPI_CompanyLocation}’ Value ‘Managed Metadata Service|Managementsystem|Standorte|Keiner’ Field with name “{ItemProperty:IPI_CompanyLocation}” was not found. (Build:3200) cc60c79d-7de1-2016-7718-e610d64bbfee
01/03/2017 11:34:47.18 w3wp.exe (0x6AF4) 0x7208 Nintex Workflow 2013 General 00000 Unexpected Error occured whild updating ‘Standort’ Value ‘Managed Metadata Service|Managementsystem|Standorte|Keiner’ Field with name “Standort” was not found. (Build:3200) 2161c79d-8d24-2016-7718-ea8bd2f45255
01/03/2017 11:39:18.50 w3wp.exe (0x6AF4) 0x76B8 Nintex Workflow 2013 General 00000 Unexpected Error occured whild updating ‘IPI_CompanyLocation’ Value ‘Managed Metadata Service|Managementsystem|Standorte|Keiner’ Field with name “IPI_CompanyLocation” was not found. (Build:3200) 6361c79d-1dec-2016-7718-edc4e72d9ddb
My Solution is not to use underscore in internal Fieldname, and not to use the NINTEX Column Picker.
But furthermore i could not use NINTEX Text variables as Input:
01/04/2017 16:06:42.56 w3wp.exe (0x6AE8) 0x3AEC Nintex Workflow 2013 General 00000 Unexpected Error occured whild updating ‘CompanyLocation’ Value ‘Managed Metadata Service|Managementsystem|Standorte|{WorkflowVariable:vartextStandort}’ Specified argument was out of the range of valid values. Parameter name: index (Build:3200) 15c3c79d-6d90-2016-7718-ea203aee434f
Hi Karl, if you specify Display name in the Taxonomy filed name that should work. For Nintex variable, use the insert reference and specify the value.
I am planning to put the code in the github. If you want you can make changes as per your requirements.
Did you have any experience with multi values in Managed Metadata Columns?
Will it be operating with multiple values ?
Currently the control does not support multivalue managed column. But you can enhance it to do that.
Karl,
Were you able to get Nintex text variables working with the custom action?
Regards,
Ken
I see you don’t monetize your blog, don’t waste your traffic, you can earn additional cash every month because you’ve
got hi quality content. If you want to know how to make extra $$$, search for:
best adsense alternative Wrastain’s tools
I have set up your wsp on our dev site. We are using Nintex WF 2016 (on-prem) and SP2016 (on prem).
Following your instructions, the Cassinni Nintex Action works as expected, BUT only if the Taxonomy Field Name and FieldValue are directly entered into the action (no wf variables). If I try to use a wf variable for any of the parameters the action fails to update the field (no errors).
What could be the possible cause(s) of this issue? Thank you in advance.
More info on my issue from above . . .
I was able to get a log entry from SP when I tried to substitute a WF varialble for the field value (“Legacy”):
09/11/2017 13:45:03.68 w3wp.exe (0x3EC0) 0x2FD0 Nintex Workflow General 00000 Unexpected Error occured whild updating ‘Document Category’ Value ‘Managed Metadata Service|DMS|Document Category|{WorkflowVariable:vFldValue_txt}’ Specified argument was out of the range of valid values. Parameter name: index (Build:4211) f246189e-7da6-d0c5-253a-461328b7bade
09/11/2017 13:45:03.66 w3wp.exe (0x3EC0) 0x2FD0 SharePoint Foundation Authentication Authorization a7r50 Medium RunWithElevated: f246189e-7da6-d0c5-253a-461328b7bade
Hi Ken,
If the WF variable results into value in this format: “Managed Metadata Service|Cassini|Document Status|Finalised|Archived”, it should work.
Since last year I have been working only in SharePoint Online Space. So I really don’t have any on-prem environment to play with. I will upload the code and post in the blog by this weekend. Feel free to change as you need.
Your recent example has 5 elements to the string. The original example has only 4. Is this latest incorrect?
Thank you for responding to my request for assistance. I look forward to looking at the code.
It will depend on your term set. If the term you are setting has parent, you need to include that. Look at the last screenshot and the value.
OK. I’m looking forward to the posting of the source code for the custom action you created.
Regards,
Ken
Anupam,
Have you had a chance to post your source code?
Regards,
Ken
Hi Ken,
Really sorry for the late reply. I developed this solution almost 2 years ago. I thought I knew where the solution was, but totally forgot last year my laptop crashed. I had to dig through few floating USB backup drives to finally find the solution.
Here is the solution file: https://goo.gl/aQpUYq
You will also need Nintex SDK which you can download from their website.
I am getting an error that the ItemProperty:MetThree is not found. Any thoughts?
Hi Alex, here is the solution file: https://goo.gl/aQpUYq
Thank you!