What does the data in your variable vTextBusinessUnitMM look like before you run the RegEx? I'm using SharePoint 2013 (it appears you're using 2010), and when I get the value from my MM column, it doesn't contain the IDforTerm information. Is this a a change between 2010 and 2013?
Let me test on 2013 and let you know.
OK so i have had a play in 2013 to see how to do this. For the test i had the following set up:
- Site 1: List with title field and managed metadata field (term set Organisation) called "Business Area"
- Site 2: List with title field and managed metadata field (term set Organisation) called "Organisation"
Requirement:
- to have a workflow on site 1 list that would enter same term into site 2 list
The above works for 2010. Here is what I did for 2013:
- workflow on site 1 list
- query TaxonomyHiddenList site 1 for "IdForTerm" (vTextIdForTerm) and "Title" (vTextTermTitle) where "Term" is value in list
- query TaxonomyHiddenList site 2 for "ID" (vIDDestinationTerm) where "IdForTerm" = vTextIdForTerm
- Build string vIDDestinationTerm;#vTextTermTitle|vTextIdForTerm (vTextUpdateTermValue)
- Create item in another site and use vTextUpdateTermValue
your solution works only if you have unique labels for terms but it is almost never the case in all farms. What if have multiple terms "terms" in multiple termsets ? How do I get the GUID of the term if I have only the label (stored in the field and accessible with nintex workflow) ?
can you leverage full path? and use that to compare in taxonomyhiddenlist?
Cassy,
Even if I can do that imagine I've the following :
Countries
France
Switzerland
Sweden
...
Keywords
France
Sweden
...
Considering taxonomy HiddenList is used for the whole site collection, if I have a Field pointing to Coutries and another pointing to Keywords, I'll have the same path, same title etc. in the TaxonomyHiddenList for 2 différents terms.
if I want to update an item from a site A to a Site B with managed metadata fields, in source field values I get something like :
"ID;Term"
my solution is :
the ID is corresponding to the ID in the TaxonomyHiddenList, instead of querying this list with the label i'll query it with the ID to get the GUID of the term. The ID is unique in the sitecollection, the Guid is unique in the whole Farm.
Then the update is done via webservice on 2 Fields "MyFieldName" + the associated hidden note Field StaticName.
I get the staticName calling webmethod "getlist" in list.asmx and querying XML result.
I can post more here or create a blog post if necessary but Nintex should really provide an action to update an item in another site or to get ManagedMetadata Guids easily.
If I use Update Item and pass in a variable containing the GUID, it doesn't work. I get the following error
But if I pass in the GUID directly rather than stored in a variable, it does work.
Any ideas why?
vs.
are you sure your variable "txtIdForTerm" has the same value as what you are entering directly?
Yes. I logged it to the Workflow history to make sure.
Is it in principle possible to set Multivalue Managed Metadata Columns with NINTEX Workflow?
Hi Cassy Freeman
My experience.
Using SP 2010, I was able using only ID;#Value to ADD the managed metadata to a NEW column using a Call Web Service Action (Not Update Item, not Set Field Value)
I was not able to UPDATE this target column, even if I remove the value from this target column.
In your scenario, do you update also your target column?
I begin to understand why there is no such action ...
Regards,
Christophe
Hi - it was a long time ago now I am struggling to remember but I believe I was adding not updating.
Thanks for your feedback. I did not find anybody able to update a managed metadata with Nintex or SharePoint Designer.
My colleague and I were able to figure this out a bit easier. In the action that creates the item in the destination we simply used this syntax:
-1;#[MMfield_0]
or example if your Managed Metadata field is called 'DocType' it would be:
-1;#DocType_0
I couldn't really tell you why it works but it does! The DocType_0 will be in the format TermLabel|TermGuid. I don't get the -1 but it makes the magic happen.
Hi ,
Does it also work for Updating the Managed Metadata?
That is what I am using it for. Creating and updating. Haven't figured out how to null out an existing field yet but haven't really tried b/c my fields are required anyway so far. It saved me about 16 steps of workflow building soap responses and whatnot.
Hi,
Where do you set -1;#DocType_0 ?
I have tried in a Build String Action without success.
Thanks,
I've used it in a couple of places but for example I put it directly in an O365/Nintex action to create an item in another site collection. Rather than select a variable or build a string first I just put it directly into that action and shockingly it worked.
That is what I feared, I cannot select this Item_0 as it is not available in the list of item on premise 2010
Or maybe I need to create one?
In your Query, is the List ID the ID of the TaxonomyHiddenList? If yes, how did you get the ID?
<Query>
<Lists>
<List ID="{0x0100F91D8395C2F2A34EB7D163EFA6D2C762}" />
</Lists>
<ViewFields>
<FieldRef Name="IdForTerm"/>
<FieldRef Name="ID"/>
</ViewFields>
<Where>
<Eq>
<FieidRef Name="IdForTerm"/>
<Value Type="Text">{WorkflowVariable:vDocCategoryValue_txt}</Value>
</Eq>
</Where>
</Query>
Can you navigate to the taxonomyhiddenlist and go list settings - the ID is in the URL.
Cassy,
How can you get the List ID of the TaxonomyHiddenList via workflow?
Regards,
Ken
You could use web service call _vti_bin/lists.asmx > GetList supply in "TaxonomyHiddenList" and get ID from result?