How to create a managed metadata column in sharepoint document library programmatically

Hi,
I want to create a column of type "Managed metadata" in a document library.
I am new to managed metadata and its basics. So i need to know what it requires to create it. i got this
1. Create a term set Group.
2. Create term set.
3. Create a term.
I am using sharepoint foundation where "Term Store Management" service is not available.
I am writing this code for OFFICE 365. So can write a code with prediction, assuming i have basic info required to run my code?
var termStore = session.TermStores["Managed Metadata"];
var group = termStore.Groups.GetByName("KB Submission Policy");
var termSet = group.TermSets["KB"];
Can write this code with respect to screen shot as follows in my term store 
Please reply...

Hi,
Please check this
http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/08/03/sharepoint-2010-cookbook-programmatically-create-term-sets-amp-metadata-columns-in-managed-metadata-service.aspx
Please remember to click 'Mark as Answer' on the answer if it helps you

Similar Messages

  • How to create a managed metadata column that allows terms from several term sets or groups ?

    My requirement is to create a a Managed Metadata column that allows terms that come from several term sets (or possibly from one group containing several term sets).
    Would it be possible ?
    Thanks.

    Hi,
    I don't know if this is possible, however the design of your managed metadata term sets should be that you don't have a type of value coming from two different sets. For example, departments in your organization, offices of your company. Let me know if you
    get a solution. It would be helpful to others.

  • Get/retreive managed metadata column value from Document Library using SharePoint 2013 JSOM

    Hi,
    I am trying to retrieve managed metadata column (NewsCategory) value in SharePoint 2013 Document library using JSOM.
    I get "Object Object" rather than actual value.
    I tried:-
    var newsCat = item.get_item('NewsCategory');
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label();
    var newsCatId = newsCat.get_termGuid();
    But, I get the error "Object doesn't support property or method get_label()"
    I also tried :-
    var newsTags = item.get_item(' NewsCategory ');
    for (var i = 0; i < newsTags.get_count() ; i++) {
    var newsTag = newsTags.getItemAtIndex(i);
    var newsTagLabel = newsTag.get_label();
    var newsTagId = newsTag.get_termGuid();
    Even now I get the error "Object doesn't support property or method get_count()"
    I have included " NewsCategory " in the load request:- context.load(items, 'Include(File, NewsCategory)');
    Any idea what the issue is? Do I have to add any *.js file using $.getScript?
    I added following .js files
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    Thanks in Advance,

    Hi Patrick,
    I already added those references. I just pasted the parts of script snippet in my initial post. To avoid confusion I am pasting here complete script.
    2.1.1.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    function getdata() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    var list = web.get_lists().getByTitle('Documents');
    var camlQuery = new SP.CamlQuery();
    var filterCategory = 'Solutions';
    var IDfromTaxonomyHiddenList = 15;
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef LookupId="TRUE" Name="'+filterCategory+'" /><Value Type="ID">' + IDfromTaxonomyHiddenList +'</Value></Eq></Where></Query></View>');
    /*the above CAML query successfully gets all the list items matching the criteria including "NewsCategory" managed metadata column values
    But when I try to display the value it retrieved it ouputs/emits Object Object rather than actual values */
    var items = list.getItems(camlQuery);
    context.load(items, 'Include(File,NewsCategory)');
    context.executeQueryAsync(
    Function.createDelegate(this, function (sender, args) {
    if (items.get_count() > 0) {
    var listItemEnumerator = items.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    var file = oListItem.get_file();
    var name = file.get_name();
    var newsCat = oListItem.get_item('NewsCategory'); alert(newsTags.constructor.getName());
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label(); // Here it errors out with message "Object doesn't support property or method get_label()"
    var newsCatId = newsCat.get_termGuid();
    } //end while
    }//end if
    Function.createDelegate(this, function (sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(getdata, "SP.Core.js");
    </script>
    In the above script "var name = file.get_name(); " gets the exact file name.
    But the line "var newsCat = item.get_item('NewsCategory');
           alert(newsCat) //Displays [Object Object]  rather than actual value.
    Issue resolved replace "oListItem.get_item('NewsCategory');" with oListItem.get_item('NewsCategory').get_label();"
    Thanks

  • No values for refiners for managed properties based managed metadata columns in SharePoint 2013 on premise

    On a SharePoint Server 2013 setup (on premise) we want to use a number of managed metadata columns in the search as refiner. The managed metadata column is called "Document Language" and so it automatically creates a managed property called owstaxidDocumentx002Language
    which I can use to do a keyword query by typing owstaxiDocumentx0020Language:"NL" in the search box and it returns results. I also marked this managed property as refineable (in the service search application) and it appears in the
    seach refiners selection box but it states that there are no values for this refiner.
    So I decided to create a new managed search property "DocumentLanguage" and maps this to "ows_Document_x0020_Language" - I marked it as queryable, searchable, refineable, retrievable and sortable but this managed search property
    is not being filled up.
    I already executed a number of full crawls but this does not seem to work. Anyone know what to do next?
    Rgds,
    Joris [http://jopx.blogspot.com]

    It happened with me many times that the automatically generated managed property is not properly mapped to the crawled property and to get the correct crawled property  get the document item 
    $web=Get-SPWeb http://webUrl
    $list=$web.Lists["documentLibrary"]
    $list.Items[0].Xml>>item.xml
    View the item.xml and check if the ows_Document_x0020_Language contains data
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

  • How to upload email from outlook to a sharepoint document library programatically.

    Hi ,
    I have a requirement where I need to create a outlook plugin which will upload selected emails to sharepoint document library. I am able to hold email using by creating the object of outlook.item.  but could n't find a way to upload created com object
    in to sharepoint library.
    I need to use webservice to upload email to the document library.
    can some one please help me with this?
    Thanks.

    Hi,
    Base on the description, you want to upload email from outlook to a sharepoint document library programatically.
    We need to do it using Web Services, there's a purpose built web service here http://cecildt.blogspot.com/2010/10/upload-documents-to-sharepoint-2010.html‎
    for uploading documents.
    The other alternative is using email enabled document libraries
    https://www.nothingbutsharepoint.com/sites/itpro/pages/how-to-setup-mail-enabled-document-libraries-in-sharepoint-2010-part-4.aspx
    Best Regards,
    Linda
    Li

  • How to keep original Uploaded File Name in SharePoint Document Library?

    HI,
    I have document library. After Uploaded the file in document library. I want to keep the file name in some other filed.
    Why because in future i may change the file name in document library so in order to know the original name of the file.
    I want to do without any workflow. Is there any other default column like that?
    How could i achieve it?
    Thanks & Regards
    Poomani Sankaran

    Hello,
    Here is list of operations for file element, and you can save it in library column:
    http://social.technet.microsoft.com/wiki/contents/articles/22156.sharepoint-2010-a-complete-list-of-spfile-operations-using-ecma-script.aspx
    http://sprider.org/2011/12/13/sharepoint-ecmascript-to-adddeleteupdateget-list-items/
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Page not found Error while creating new sub folder in the Sharepoint Document Library

    Hi All,
    I am a site collection administrator when i creating new sub folder under the folder in document library, am getting below error
    "Page not found  The
    page you're looking for doesn't exist."
    please help me, Thanks in advance!!
    Srinivas

    Hi Srinivas,
    Please check ULS log for more useful information when this error occurs.
    Please also check if this issue could be reprodued in other libraries, if not, you can use the new library instead.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Managed Metadata selection not appearing in Editform.aspx and DisplayForm.aspx after Managed Metadata column added to library.

    Hi,
    I added two managed metadata columns into a document library, but they are not appearing when you try to upload, or edit the properties of a document.
    In the Managed Metadata service the metadata is 'Available for Tagging' , and I've also looked at the permissions in
    http://sitenameLists/TaxonomyHiddenList/AllItems.aspx
    As one blog suggested, but this already has read access granted to NT AUTHORITY\Authenticated Users (NT AUTHORITY\authenticated users)
    The Connection Permissions in Central Admin, in the Managed Metadata Service Application has Full Access to Term Store granted for the service account that the application pool (Identity) is running under for the web app the site collection
    is in. 
    I've also deleted the whole document library and started over again, but the metadata selectors just don't show up for anyone, even when tried with the farm account.
    Any ideas what to investigate next appreciated.
    Thanks,
    Jonathan

    Ok, I think I've worked it out.
    It's to do with Content Types, if you add your own custom content type, then delete the default Document content type on a document library, before you add additional Managed Metadata columns to the library, they don't appear in the form. Another
    one for the Sharepoint quirks list.

  • Updating a managed metadata column from choice column value

    I am trying loop through
    all lists in a web, and for each list, 
    1. create a managed metadata column->Working
    2.
    Pull value from choice column->Working
    3. Move
    choice column value to managed metadata column->Not Working
    Point number 3 is not working. Please advise
    Here is the code:
    static void Main(string[] args)
    //Pulling the rootweb of the Site
    const string SPLocationListColumn = "CHECK6";
    SPSite site = new SPSite("http://sp2010:8080");
    SPWeb rootweb = site.RootWeb;
    //Setting up the taxonomy terstore, termset and term
    Microsoft.SharePoint.Taxonomy.TaxonomySession taxonomySession = new Microsoft.SharePoint.Taxonomy.TaxonomySession(site);
    TermStore termStore = taxonomySession.TermStores["Managed Metadata Service"];
    Console.WriteLine(termStore.Name);
    Group group = termStore.Groups["KM Metatags"];
    Console.WriteLine(group.Name);
    TermSet termSet = group.TermSets["Document Classification"];
    Guid termsetid = termSet.Id;
    Console.WriteLine(termSet.Name);
    Term term = termSet.Terms["Document subclassification"];
    TermCollection terms = termSet.Terms;
    Console.WriteLine(term.Name);//Looping through all webs of the input website
    SPWebCollection collWebsite = site.AllWebs;
    for (int i = 0; i < collWebsite.Count; i++)
    using (SPWeb oWebsite = collWebsite[i])
    //Looping through all lists in web
    SPListCollection collList = oWebsite.GetListsOfType(SPBaseType.DocumentLibrary); ;
    for (int j = 0; j < collList.Count; j++)
    SPList list = collList[j];//if the list name is Documents, create a new field of MMS type
    if (list.Title == "Documents")
    Console.WriteLine(list.Title);
    TaxonomyField field = list.Fields.CreateNewField("TaxonomyFieldType", SPLocationListColumn) as TaxonomyField;
    field.SspId = termSet.TermStore.Id;
    Console.WriteLine(termSet.TermStore.Id);
    field.TermSetId = termSet.Id;
    Console.WriteLine(termSet.Id);
    field.AnchorId = Guid.Empty;
    try
    {//Add the newly added MMS field to default view
    Console.WriteLine("Entering");
    Console.WriteLine("Entering");
    list.Fields.Add(field);
    Console.WriteLine("Entering");
    Console.WriteLine("Entering1");
    SPView view = list.DefaultView;
    Console.WriteLine("Entering2");
    list.Update();
    SPViewFieldCollection collViewFields = view.ViewFields;
    collViewFields.Add("CHECK6");
    Console.WriteLine("Entering3");
    view.Update();
    Console.WriteLine("Entering4");
    catch (Exception e1)
    Console.WriteLine(e1.Message);
    }//Capture a choice field by name subclass and move it to the newly added MMS field
    for (int f = 1; f < list.ItemCount; f++)
    if (list.Title == "Documents")
    Console.WriteLine(list.Title);
    SPListItem item = list.Items[f];
    if (item.Fields.ContainsField("subclass"))
    SPField field9 = item.Fields["subclass"];
    String subclassvalue = field9.GetFieldValueAsText(item["subclass"]);
    Console.WriteLine(subclassvalue);
    TaxonomyField taxonomyField = item.Fields["CHECK6"] as TaxonomyField;
    TaxonomyFieldValue taxonomyFieldValue = new TaxonomyFieldValue(taxonomyField);
    taxonomyFieldValue.TermGuid = term.Id.ToString();
    taxonomyFieldValue.Label = subclassvalue;
    taxonomyField.Update();
    item.Update();
    list.Update();

    From here:
    http://www.c-sharpcorner.com/uploadfile/anavijai/programmatically-set-value-to-the-taxonomy-field-in-sharepoint-2010/
    taxonomyFieldValue.TermGuid = term.Id.ToString();
    taxonomyFieldValue.Label = term.Name;
    SPListItem item = list.Items.Add();
    # item["Title"] ="Sample";
    item["TaxonomyField"] = taxonomyFieldValue;
    item.Update();
    list.Update();
    it appears you're missing the point where you assign that taxonomyFieldValue to the item's taxonomy field in question.

  • Set Empty Managed Metadata Column - Working in 2010 and not in 2013

    I have seen posts similar to mine below but am still not finding a solution. I understand that setting an already populated managed metadata column can be problematic using SPD. However, my column is empty, and what works in 2010 is not working in 2013.
    Issue: In SharePoint 2010 On-premises, I am able to set an empty Managed Metadata column on a file in a document library via SPD workflow using the following format:
    ID;#Term|IdForTerm
    In SharePoint 2013 Online, I am attempting to create a SPD workflow to do the exact same thing (ID;#Term|IdForTerm) and am experiencing the following results depending upon the type of workflow I try:
    - SP 2010 Workflow - The workflow status result is Completed, but the managed metadata column remains empty.
    - SP 2013 Workflow - The workflow internal status becomes Started and effectively remains this way until I end the workflow.
    Any thoughts on what needs to change for 2013 when doing this? 
    Thanks in advance for any help or guidance.
    Alan

    Hi,
    I try to reproduce the issue in my SharePoint Online environment, however, everything works well.
    I create term set as below:
    Then start the workflow and the value in the browser view. The result is as below:
    I recommend to create another managed metadata column to check whether it works.
    Or you can create another library to check whether it works.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Managed metadata columns in document information panel with multiple content types

    Hi everyone,
    The problem I have is that for custom content types not all managed metadata columns are displayed in Document Information Panel (DIP) for the document in the Office client application. 
    However, everything works fine with 1 specific content type. Even though the others using exactly the same site columns. The content types are deployed using visual studio to the content type hub, and after this the content types are correctly published to
    the site collections, there are no publish issues here. 
    When I create a document based on the second content type in the same library, all fields are showed in the document information panel, except the managed metadata columns.
    Detailed explanation:
    Library: procedures
    Content types:
    - simple procedure (with 4 managed metadata fields and some other text fields)
    - procedure with approval (with the same 4 managed metadata fields and some other text fields)
    Scenario 1: I add the 'simple procedure' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
    Scenario 2: I add the 'procedure with approval' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
    Scenario 3: I add the 'simple procedure' and 'procedure with approval' content types to the document library procedures (added simple procedure first). When I create a new document based on the 'simple procedure'
    content type, everything works fine and he shows all metadata fields. When I add a new document based on the 'procedure with approval' content type, the document information panel shows correctly, except all managed metadata fields. These are not visible at
    all. Though they worked perfectly in scenario 1 and 2.
    Is this a known issue or is there a workaround for this? 
    Thanks in advance! 
    Kind regards, Davy

    Yes!
    This problem is solved right now.
    My issue was that I'm using custom content types deployed by Visual Studio in the content type hub. To create a managed metadata site column in visual studio, you need to have first of all your managed metadata field, but also a hidden field accompagnied
    to make the actual mapping like the example below:
    <Field ID="{B654D984-187A-471B-8738-F08F3356CFDA}"
    Type="TaxonomyFieldType"
    DisplayName="Countries"
    ShowField="Term1033"
    EnforceUniqueValues="FALSE"
    Group="Demo"
    StaticName="Countries"
    Name="Countries">
    <Customization>
    <ArrayOfProperty>
    <Property>
    <Name>TextField</Name>;
    <Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{67308AC2-9556-456B-BF9E-43E8F23EBEE6}</Value>
    </Property>
    </ArrayOfProperty>
    </Customization>
    </Field>
    <Field Type="Note"
    DisplayName="Countries_0"
    StaticName="CountriesTaxHTField0"
    Name="CountriesTaxHTField0"
    ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}"
    ShowInViewForms="FALSE"
    Required="FALSE"
    Hidden="TRUE"
    CanToggleHidden="TRUE"
    Group="Demo"
    RowOrdinal="0"
    />
    </Elements>
    VERY important here is that when you create your content type using visual studio, you not only have to add the managed metadata site column in your xml (which let the content type work already perfectly) but also add the hidden field to your content type
    xml !! This way, SharePoint knows that when you have multiple content types with the same site columns in the same library, the second content type also need to get the hidden field from this site columns like in the example below!
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Document (0x0101) -->;
    <ContentType ID="0x010100571ebc0f478a49d5a775039347ee1535"
    Name="Document Location"
    Group="Demo"
    Description="A content type containing Managed Metadata Column."
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{B654D984-187A-471B-8738-F08F3356CFDA}" Name="Countries"/>
    <FieldRef ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}" Name="CountriesTaxHTField0"/>
    <FieldRef ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" Name="TaxCatchAll"/>
    <FieldRef ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" Name="TaxCatchAllLabel"/>
    </FieldRefs>
    </ContentType>
    </Elements>
    I'm very happy I found this solution, because in the whole project i'm implementing, this was used a lot!
    Special thanks to the blog of @cann0nf0dder (http://cann0nf0dder.wordpress.com/2013/04/01/creating-a-site-column-with-managed-metadata) which let me think about this! 
    This ticket is answered now! :-)
    Kind regards,
    Davy

  • Issue when filtering with Managed Metadata Columns in Share Point Document Library

    Hi All
    I have a document library, and a four Metadata Columns in it, with each column having a number of term in it. I have no issues in adding a document or in term sets. We have set property of Managed Metadata Column as Allow Multiple Values. So some of the items
    in library contains values with only one term set. While other documents contains values with multiple values.
    We have a number of country sites having the document library  with same metadata columns. In document library default view i am showing Metadata column, User want to filter the documents (view) based on Metadata column selected.
    The filtering is giving inconsistent behavior. In production server it is giving in error with some correlation ID. On our development machine some times it is working fine and some other times it is given error of Validation of Viewstate MAC failed. i tried
    on different countries sites.
    I checked we have already kept the Metadata Navigation and Filtering under site action feature as activated. It was even more weird when i deactivated the feature on one country site and the filtering was working fine. And on other country site where i
    kept the feature as activated and the filtering was giving an error.
    Thanks & Regards
    Amit

    Hi Amit,
    Have you checked the ULS error message for more information with correlation ID?
    Please try using the library metadata navigation to filter these managed metadata columns value via configuring library "Metadata navigation settings" after you enabled the "Metadata Navigation and Filtering" feature,
    then check if the issue would still persist.
    Please see more information from below article with similar issue.
    http://blog.tippoint.net/filter-by-managed-metadata-field-in-asset-picker-dialog/
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you havefeedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • How to update managed metadata column for all file in document library using powershell

    Hi,
    How to update managed metadata column for all file in document library using powershell?
    Any help on it.
    Thanks & REgards
    Poomani Sankaran

    Hi TanPart,
    I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation  Document Library.But i am getting below error in powershell.
    Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
    Could you tell me which is the issues in it?
    See the code below.
    $web = Get-SPWeb http://ntmoss2010:9090/Site
    $list = $web.Lists["DocLib"]
    $query = New-Object Microsoft.SharePoint.SPQuery
    $query.ViewAttributes = "Scope='Recursive'";
    $query.RowLimit = 2000
    $caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
            '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
    $query.Query = $caml
    do
        $listItems = $list.GetItems($query)
        $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
        foreach($item in $listItems)
            #Cast to SPListItem to avoid ambiguous overload error
            $spItem = [Microsoft.SharePoint.SPListItem]$item;
            Write-Host $spItem.Title       
    while ($spQuery.ListItemCollectionPosition -ne $null)
    Thanks & Regards
    Poomani Sankaran

  • Provision a document library definition with managed metadata column using Visual Studio 2010 designer

    hi all,
    how can i create a document library with a managed metadata column and lookup column .
     what  should be the  type for managed metadata column ? is it "Taxonomy", if yes how can i enter the term set values which should be populated by default.
    also would like to know how to refer the parent list / column[field] in the loopkup field
    help is appreciated!
    thnx

    Hi,
    To add a Managed Metadata field into the list definition, you can take a look at the link below with steps in details about the same requirement.
    http://gheckoplus.blogspot.com/2011/10/how-to-sharepoint-2010-list-definition.html
    For the Lookup field:
    http://abdulazizfarooqi.wordpress.com/2012/08/17/provisioning-lookup-field-in-sharepoint-2010-lookup-field-in-the-list-in-sharepoint-2010/
    http://ronsp.wordpress.com/2011/04/27/declaratively-adding-a-lookup-field-to-a-list-schema-using-customschema-attribute-in-listinstance/
    What’s more, if you have several questions to ask, I suggest you post them into every single thread to make them easier to be discussed in the forum.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Caml query using managed metadata column

    hi,
     I am having a console appln, where i want  to pass the one paramater in the form of siteCol1:subsite1:subsite2  where  siteCol1:subsite1:subsite2 is the path of subsite which is in MMS.
    Can i pass this string paramter to the splist which contains a taxonomy column   and match this paramter in the listitemcollection and fetch only those recordw which matches this crirteria.
    and it should fetch the values which matches in a splist. the caml query it expects contains the taxonomy -managed metadata column - , but i am stuck with
    SPList splistLIST = parenttWeb.Lists.TryGetList("LIST1");
                          if ((splistLIST.Items.Count > 0 && splistLIST!= null))
                              SPQuery   objnodeQuery = new SPQuery();
                              objnodeQuery.Query =
                                  string.Format(
           "<OrderBy>" +
              "<FieldRef Name='ID' />" +
           "</OrderBy>" +
           "<Where>" +
              "<Eq>" +
                 "<FieldRef Name='myTaxonomy' />" +
                 "<Value Type='Text'>{0}</Value>" +
              "</Eq>" +
           "</Where>", _mcurrentPathTermSet);
                              SPListItemCollection nodeItemCollection = splistLIST1.GetItems(objnodeQuery);
    am not able to retrieve the listitems which passes this as a parameter and retrieve those records where it matches this taxonomy column.
    my doubt is, how to pass a string parameter to the splist contains taxonomy column and fetch those records

    Hi,
    Managed metada column does not supported in lookup column as the thread below:
    https://social.technet.microsoft.com/Forums/en-US/0dee5ba4-9648-445f-a774-8c59cf01b81c/confirmation-needed-cant-lookup-managed-metadata-field-with-lookup-column?forum=sharepointgeneralprevious
    If you prefer managed metadata in Search, then I'd suggest you find workaround to use managed metadata column in lookup column. You could use a workflow to copy the managed metadata column to a text field, make the text field to be hidded from the list if
    necessary. Then lookup this text field in other list.
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for