cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SharePoint 2010: Create item in another site with managed metadata

Hi,

 

I have two lists in different site collections, now I try to copy one item from list A to list B.

Therefore, I tried both using the "Create item in another site" action as well as the "Call webservice" action using the Lists.asmx webservice.

 

Everything works fine for both actions as long as I restrict the copy to text fields (Title, ...). But as soon as I try to copy managed metadata fields, both actions will fail.

 

"Create item in another site" gives me the following error (translated from German, sorry): "The given GUID does not exist in the terminology store".

 

How do I move this kind of field information? The lists are an exact copy of each other.

 

Thanks for your help!

Labels: (1)
0 Kudos
Reply
15 Replies
Workflow Hero

Re: SharePoint 2010: Create item in another site with managed metadata

Hey Tamara

As I'm sure you're finding, Managed Metadata is an odd beast. This is something that is related specifically to the way the data is returned - these fields behave more like lookup fields than they do text fields and you will find the same behaviour using SharePoint Designer workflow.

In essence, please try the following method of getting the actual MMD term, so that you can save that to a variable and use it to update the destination document's MMD field:

"QUOTE" - Managed meta-data behave a lot like lookup fields. If you get the value, you just get the textual value, but in order to set a meta-data field, you need to have the ID. A colleague and me found a graceful way to lookup the ID of a managed meta-data property (istead of a web service call).

Here I use "Product" as an example meta-data field.

1) Set Variable:  txt_product = currentitem.Product

You get a value like "HardwareSmiley Tonguerinter PPU Contract:HP:HP Laserjet 4100 MFP|6709b255-4fe8-40f8-9e32-f93aa807572a"

2) Regular Expression "Replace Text" with Pattern: "[^\|]*\|" --> txt_productId

3) Query list in the Taxonomy Hidden List of the site collection,  http://.../sites/isd/Lists/TaxonomyHiddenList/AllItems.aspx

CAML query used (replace the List ID with the list id of your Taxonomy Hidden List) :

<Query>
    <Lists>
        <List ID="{33dfe138-603b-4ea4-86aa-07ba3cbd6e42}" />
    </Lists>
    <ViewFields>
        <FieldRef Name="ID" />
    </ViewFields>
    <Where>
        <Eq>
            <FieldRef Name="IdForTerm"  />
            <Value Type="Text">{WorkflowVariable:txt_productId}</Value>
        </Eq>
    </Where>
</Query>

-----

I took this from a post on our previous community site, 'Connect', and you can view the full thread here:

Nintex Connect - How-to get ID for Managed Meta-data

Let us know how you get on

0 Kudos
Accept as Solution Reply
Not applicable

Re: SharePoint 2010: Create item in another site with managed metadata

Hey Simon,

thanks for your response. I tried your suggestions today, but found that I don’t get the value as described below, but instead I get the selected term returned as a String without any ID and so on.

E.g. I select “FWC” from the Termstore and now I retrieve strProgramme = currentItem.Programme, I get “FWC”.

Thus, my regular expression als returns “FWC” and my query list fails.

Any ideas? Might this be due to different Nintex build versions?

Best regards,

Tamara

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: SharePoint 2010: Create item in another site with managed metadata

I ran into this issue a while ago, here is what I discovered, I hope it helps!  Setting managed metadata fields in a Nintex workflow

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: SharePoint 2010: Create item in another site with managed metadata

Great article Jan, thanks

0 Kudos
Accept as Solution Reply
Not applicable

Re: SharePoint 2010: Create item in another site with managed metadata

Hi Jan,

thanks for the excellent description.As I need to create items across site collections I was considering a web service call anyway, so now I can just use your solution to build this.

However, I still have the issue that reading the managed metadata field, I don't get any ID / GUID - I just get the term itself. With that, I can't follow neither solution approach.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: SharePoint 2010: Create item in another site with managed metadata

What's stored in the TaxonomyHiddenList? Maybe you can do a query to this list to get the GUID?

0 Kudos
Accept as Solution Reply
Not applicable

Re: SharePoint 2010: Create item in another site with managed metadata

I have two entries with „FWC“ in one site collection and 3 on the other site collection. The “IdForTerm” is different for 1 item in both site collections.

So how do I choose which entry to take? And isn’t it strange that in several references on the internet the managed metadata field should return “Termtext|GUID” and my system returns only “Termtext”?

I will try to install Nintex on our other development system and try whether this behavior can be reproduced.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: SharePoint 2010: Create item in another site with managed metadata

I think this is a SharePoint issue not a Nintex one, was a migration/ restore performed at all? The managed metadata could get out of sync and hence the GUIDs are not showing up as expected. Take a look at this article. Invalid Terms in Managed Metadata Field « My Memory Sucks

0 Kudos
Accept as Solution Reply
Not applicable

Re: SharePoint 2010: Create item in another site with managed metadata

Managed to work on this today and found this to be an user issue :-)

Instead of using "Value" in the "Set variable" action I needed to use "List lookup" and then I get the "term|UID" text string returned as desribed by you.

 

However, using the blog post from Jan I get the following error trying to set the fields:

"Results xmlns="http://schemas.microsoft.com/sharepoint/soap/"><ResultID="1,New"><ErrorCode>0x81020014</ErrorCode><ErrorText>One

or more field types are not installed properly. Go to the list settings page to

delete these fields.</ErrorText></Result>"

 

My call webservice action looks like this:

Image 200.png

0 Kudos
Accept as Solution Reply