How to incorparate managed metadata functionality in a web part

Hello,
I'm writing a web part that manipulates a list's managed metadata field . I want to give to the users all the functionality that SharePoint gives, like realtime searching, the popup window to add a new term and so on.
I was thinking of (somehow) hooking  the javascript code to my  field, but I don't know how.
Is there another approach to do it?
Thank you
Christos

Hi Chris,
Are you looking for something like this
http://www.myspblog.com/2011/05/managed-metadata-web-part.html
Please remember to click 'Mark as Answer' on the answer if it helps you

Similar Messages

  • 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

  • How to use the set functions effectively in webi ,please let me know with detail

    how to use the set functions effectively in webi ,please let me know with detail

    Hi,
    we use use set functions on heirarchies with aggregate functions mostly .
    If you include member_set, Min returns the minimum value of the aggregated data for all members in the member set.
    Member_set can include multiple sets separated by semicolons (;).
    The list of member sets must be enclosed in {}.
    If the member set expression does not specify a precise member or node, the hierarchy referenced must be present in the table, then the member set expression references the current member in the hierarchy in the table. If the hierarchy is not in the table, the function returns the message #MULTIVALUE.
    Eg .
    1)     Ancestor
    =Sum([YTD] ; {Ancestor([Test Hierarchy];2)})
    2)     IsLeaf
    =[Test Hierarchy].IsLeaf
    You can use this function when you want to show your Measure only at lower level .
    3)     .Depth
    =[Test Hierarchy].Depth
    This is also function used with hierarchy to find Level of Members .
    Follow this link for PDF reference .
    Page 147
    https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDIQFjAB&url=https%3A%2F%2Fhelp.sap.com%2Fbusinessobject%2Fproduct_guides%2Fboexir4%2Fen%2Fxi4sp5_ffc_en.pdf&ei=nBAUU-iUM4WWrAeMuoCoDg&usg=AFQjCNHakXsEjd_yUk2y3lVdibf3PXpEOA&bvm=bv.61965928,d.bmk
    search on SCN this question was discussed before also one those links .
    http://scn.sap.com/thread/3183380
    Hope this will help you .

  • Newby question: I have a report that is featured and is available for Q&A and now I want to display this functionality in a web part of a site...

    Hi,
    I have a report that is featured and is available for Q&A and now I want to display this functionality in a web part of a site.
    I am using a trial right now, so I am not sure if I have all the necessary licences, but I am really new to this subject so a link to msdn page or blog item might already do the trick.
    This is what I have right now: 
    https://www.youtube.com/watch?v=rV2_m4iWxSE
    Thanks

    No that is not currently available. 
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Accessing page metadata on a content web part to generate a custom link.

    This is what I am trying to do in Sharepoint 2013...
    Page1 has a metadata element which tags the page to a department (e.g. Finance, HR, Operations etc) and another element that tags the page to a location (NY, London, Brussels etc). On a new web part on the page I want to create a link to another page, Page2.
    Through the link, I want to pass the value of these metadata elements to Page2. On Page2, through an onload JS function, I want to change the value of some field (text or dropdown etc) using the passed values.
    I am having trouble figuring out a way to perform the page1 actions. I need to understand how to generate a URL based on the metadata elements, which will contain parameter values equal to these element values. I'd appreciate any help in understanding the
    way to do this.
    Regards,
    VRA

    Hi Vinay,
    According to your description, my understanding is that you want to generate a URL which contains the tags of the page1.
    I recommend to programmatically get the tags of the page1 in SharePoint first, please refer to the link below:
    http://www.c-sharpcorner.com/uploadfile/anavijai/programmatically-get-all-the-social-tags-for-the-specified-url-in-sharepoint-2010/
    After that, we can set the URL like this: http://server/pages/page2?department=Finance&location=NY. (Finance and NY are an example of the tags gotten programmatically)
    Then we can pass the parameter values of the tags to page2 using JavaScript.
    http://javascriptproductivity.blogspot.com/2013/02/get-url-variables-with-javascript.html
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Project Server 2010:- How to add Own Workspace filter in workspace web part like project server 2007

    Hi All,
    I am using project server 2010.
    Can some one advise me how can I add Own Workspace filter option in workspace web part like project server 2007 which is showing all projects name page by page. There no filter option available. I am not sure if there is any out of box feature. 
    Thanks in Advance..

    Nitin,
    PS2010 shows by default the workspaces you have permissions to. Unfortunately, there is no more filtering options available.
    The only solutions are to write a custom webpart, or develop your own SSRS Report, which you can customize the way you want.
    Refer to Paul's excellent blog post on this topic here:
    http://pwmather.wordpress.com/2011/08/05/custom-projectserver-project-site-workspace-view-in-pwa-ps2010-ps2007-epm-msproject-ssrs/
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:

  • How to dynamically change link in Page Viewer Web Part SharePoint 2010?

    Newbie Question:
    Situation:
    a) Created: Two Site Pages page 1 & page 2
    b) Page 1: Includes simple hyperlink text Example - Home | About Us | Contact etc
    c) Page 2: Includes Page Viewer Web Part that includes link to an existing web site (this site has all of the pages) and the olde site is shown in SharePoint site
    Complication:
    a) I want the users to click on Page 1 - About Us etc
    b) The View on Page 2 - page viewer link should be dynamically updated to About Us . If user clicks on contact us on Page 1..the page 2 view should change dynamically to Contact US
    ASK:
    a) How do I dynamically update the links in Page Viewer web part using minimal coding (if possible)
    Any Guidance will be greatly appreciated.

    Hello,
    You can also used the another appoch,
    Create your custom webpart , then add the PageViewer Webpart at run time,Create webpart property for the custom webpart to change the url and add the PageViewer webpart runtime,
    I have created the custom webpart property to specified the url at the tine of edit the webpart
    Here is the code
    using System;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.WebControls;
    using System.Collections;
    using Microsoft.SharePoint.Publishing.WebControls;
    using Microsoft.SharePoint.WebPartPages;
    namespace MyNameSpace.MyPageViewer
    [ToolboxItemAttribute(false)]
    public class MyPageViewer : System.Web.UI.WebControls.WebParts.WebPart
    private string _customUrl = "http://yourdefaulturl";//Specified default url
    [WebBrowsable(true)
    , Personalizable(true)
    , Bindable(true)
    , Browsable(false)
    , DefaultValue("")
    , Category("Custom Page Viewer Properties")
    , WebPartStorage(Storage.Shared)
    , FriendlyName("PageViewer URL")
    , Description("PageViewer URL")]
    public string CustomUrl
    get { return _customUrl; }
    set {if (string.IsNullOrEmpty(value) == false) { _customUrl = value; } }
    #endregion
    public MyPageViewer()
    this.ChromeType = PartChromeType.None;
    protected override void OnInit(EventArgs e)
    EnsureChildControls();
    base.OnInit(e);
    protected override void CreateChildControls()
    string pageViewerUrl = CustomUrl;
    Microsoft.SharePoint.WebPartPages.PageViewerWebPart pageViewerWebPart = new Microsoft.SharePoint.WebPartPages.PageViewerWebPart();
    if (!string.IsNullOrEmpty(pageViewerUrl))
    pageViewerWebPart.ContentLink = pageViewerUrl;
    pageViewerWebPart.ChromeType = PartChromeType.None;
    pageViewerWebPart.Height = "382";
    pageViewerWebPart.Width = "682";
    this.Controls.Add(pageViewerWebPart);
    protected override void OnLoad(EventArgs e)
    base.OnLoad(e);
    protected override void OnPreRender(EventArgs e)
    base.OnPreRender(e);
    Hope this will help you
    Hiren Patel | Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How to fix javascript error/bug on custom web part of SharePoint 2013

    I have a custom web part with serveral business fields. This web part is installed on DispForm, EditForm an NewForm.
    But, I click on Attach File button and a javascrit error is throw on my browser's status bar.
    Line: 5279
    Character: 5
    Code: 0
    URI: http://mysite:4000/_layouts/15/form.debug.js?rev=vyMg8qjZfJ8La1jn7bQ2cg%3D%3D
    How to solve this problem? I think it is a javascript conflict
    Tarcísio Corte [email protected]

    Hi,
    1. You can create a simple demo web part without your custom code firstly, then insert it into your form pages to see if the similar issue would occur. If it works, then add your
    other code into it one after one. By doing this, it will be easier to find out the root cause of this issue.
    2. What browser do you use? Please try to use IE 10(SharePoint 2013), IE8(SharePoint2010).
    3. You can also debug your code using IE F12 Developer Tools.
    http://blogs.msdn.com/b/kaevans/archive/2011/04/25/debugging-javascript-with-the-ie-developer-tools.aspx
    If the issue still exists, I can suggest you provide more information for further research.
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to create a thread safe and concurrent web part

    Hi,
    I am creating a sharepoint web part. 
    The web part will store the information in the sharepoint list.
    The web part is going to be used by 300 users all at the same time at the same moment.
    Each 300 users  trying to update list clicking button on my web part almost every 20 seconds.
    I am worried will the sharepoint List be able to handle so many concurrent updates.
    How should I design my webpart so that such issues do not arise and my webpart is also fast.
    Regards
    Vinod

    Hi,
    Per my understanding, there might be a concern about the performance and concurrent operation in your Visual Web Part.
    By default, there is already a built-in system in SharePoint handling the concurrent operation in a list, if the workload is not so high, it would be OK for the commonly use in
    your scenario.
    If there would be a requirement about creating a “fast” web part,
     a possible solution can be like this:
    In the web part, users click button to submit the specific update requirements with some data to server. In server side, we can create an application to handle the requests(add/update/delete
    item) from users sequentially one after one.
    By doing this, in client side, the web part will only responsible for submitting user request with simple data, all the time consuming jobs will be split into small tasks and being
    executed sequentially in server side.
    Also, here are two links below about some useful tips in developing web part which would be helpful to you:
    https://msdn.microsoft.com/en-us/library/dd583135%28v=office.11%29.aspx?f=255&MSPPError=-2147217396
    http://apmblog.dynatrace.com/2010/03/18/how-to-avoid-the-top-5-sharepoint-performance-mistakes/
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How does the "Read TDMS" function work when reading part of a data file?

    Hi everyone,
    I have stored some rather large .lvm files that causing me a a big headache when trying to read/analyse the data.... As a work around I first convereted these files to .tdms.... Now the files are much smaller (50%) and can be load/plot within a couple of seconds rather than 10's of seconds.
    Specifically, the files include 7 channels of data that were sampled at 2kHz for about 8-9 mins..... So, each file contains about 700,000 data points or elements.... I am using a producer/consumer architechure to read/plot all the data, then using cursors to identify a data subset, which is send via a queue to the consumer where analysis occurs.... Given the size of the files, when subset is quite large I get "Out of Memory" errors and LabVIEW crashes.
    What I am thinking is that I can down-sample or decimate the data in the producer back to 1kHz (I need to ms resolution so I can see the spikes and can appropriately selected the subset) then index back into the original tdms file to send the undeciated data to the consumer.
    With the "Read TDMS" function, the help states:
    COUNT: Specifies the maximum number of data elements to read from the .tdms file for each channel. The default is –1.
    OFFSET: Specifies the number of data elements into the .tdms file at which the function begins analyzing the .tdms file. The default is 0.
    I am confused by the term "elements". Does this mean actual "data points" as in elements within the 2D array? Or bytes? I am hoping array elements... Would this then mean that given my 7 channels of data, each element value that is a multiple of 7 would index into a new line of data? I also assume this index is zero based... So with no offset, a count value of 0 would return all the data elements at time 0.0000s for all channels (regardless differences in the precision of each channel, unlike bytes), a value of 7 would return all the data elements at time 0.0005s, a value of 14 would return all the data elements at time 0.0010s, etc etc..
    Also, if anyone has any example code for indexing into a file using this method they could shareI would be very appreciative... I would assume a for loop could also be used to read the data subset into the consumer in smaller chunks to reduce the memory load?
    Many thanks,
    Jack

    You should have a different channel in the TDMS file.  So you are reading X elements from a channel starting at element Y.  Yes, those are elements in the array, not Bytes.  NI did a good job of making the API easy to use.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to dispaly Excel Timeline slicer in Excel web part

    i have created the excel pivot chart using data from sharepoint list. i have inserted time slicers in the excel sheet. it working fine in both excel client and excel service (Browser). The problem is now i want show the chart in my site home page. Show
    that i have use the excel publish option and choose the item (Chart) only show option. When i show the excel sheet in my home page the chart working fine but the Time slicer not showing in web part. But still the timeline working properly when i
    directly open the excel sheet without web part

    Hi Ravin,
    please have a try to update to the latest of the cumulative updates, from the SP1 update.
    http://blogs.technet.com/b/steve_chen/archive/2013/03/26/3561010.aspx
    as i know from my colleague in sharepoint online team, it was a known issue and fixed in october. so perhaps you may consider to update to the october 2014 release.
    meanwhile, perhaps you can try these steps for a workaround:
    set the emulation document mode in Internet Explorer 11 to something other than "Edge (Default)".
    To apply the workaround: 
    Open IE on the client experiencing the issue
    Press F12 on the keyboard to bring up Developer Tools.
    Click the emulation icon on the left side and choose anything but “Edge (Default)” for Document Mode
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Get Managed Metadata (Taxonomy) ALL Lists with Columns and ALL Choice Lists with Columns VALUES programmatically

    Hi there,
    How to get Managed Metadata Lists  ALL Columns and ALL Choice Lists Columns that are used in the Site Collection programmatically please.
    Regards

    Hi sharepointaju,
    Managed Metadata list is a hidden list, that you can access it through
    http://siteurl/Lists/TaxonomyHiddenList/AllItems.aspx, then it is similar to other lists, you can use server or client code to interate each field in the list, show the the value for each item.
    For all choice list columns, I'm not clear what you mean in this situation, do you mean to get all choice columns in the site collection, if so, iterate site columns, and lists to get list fields, check whether it is a choice type field.
    This may be not your requirement, please provide more information how you want to get which value.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Call managed bean function using javascript

    Any one help me how to call managed bean function through Javascript onload() event.

    What do you want to do after all? Isn't the constructor/initblock of the bean sufficient? Which JSF version/implementation are you using?

  • Update list item with managed metadata field returns The security validation for this page is invalid

    Using SharePoint 2010 Server
    I'm attempting to programtically update a managed metadata field in a document library. I'm able to do it without issue on all other non-managed metadata fields. When I attempt it on a MM field I get the error message
    "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."
    After some digging I realised that this error was being caused because SharePoint was trying to write to the TaxonomyHiddenList list (../sites/mysite/Lists/TaxonomyHiddenList/AllItems.aspx)
    When I update a document through the browser with a term (Term01), it shows up in this TaxonomyHiddenList . I can then run my application, apply Term01 to my new document and it works fine. But if I apply Term02 to my new document it gives me the error above.
    Summary
    My app can read the TaxonomyHiddenList fine but it can not perform an operation that would write to it, resulting in not being able to update the MM field.
    Question
    Is there any advice on how I can further debug this issue?

    Hi,
    According to your post, my understanding is that you want to update managed metadata field in document library programmatically.
    I have made a simple code demo below to updata managed metadata field in document library, it works like a charm, you can refer to it.
    public static void UpdateMSField()
    using (SPSite site = new SPSite("http://YourSiteURL"))
    using (SPWeb web = site.OpenWeb())
    //SPList list = web.Lists.TryGetList("Libs_1");
    SPDocumentLibrary lib = (SPDocumentLibrary)web.Lists["Libs_1"];
    // No point in proceeding if we can't find the list
    if (lib != null)
    // add a new item
    // SPListItem item = list.AddItem();
    SPListItem item = lib.GetItemById(1);
    //Console.WriteLine(item.Name);
    // get the current taxonomy session, which wraps up all of the
    // associated TermStore objects for this SPSite object
    TaxonomySession metadataService = new TaxonomySession(site);
    // get the taxonomy field
    TaxonomyField taxField = item.Fields["MMS_1"] as TaxonomyField;
    // get the term store associated with the taxonomy field
    TermStore termStore = metadataService.TermStores[taxField.SspId];
    // get the actual term set associated with the taxonomy field
    TermSet termSet = termStore.GetTermSet(taxField.TermSetId);
    // search for the terms we wish to set the field to
    var terms = termSet.GetTerms("term_1", true, StringMatchOption.ExactMatch, 1, false);
    // if we have found a term populate the field
    if (terms.Count > 0)
    // set the field to the term(s) we have found
    taxField.SetFieldValue(item, terms.First());
    // Update the item
    item.Update();
    Console.WriteLine("success...");
    More reference:
    http://www.3guysonsharepoint.com/?p=1052
    http://vineet-winit.blogspot.com/2013/04/how-to-update-managed-metadata-field-in.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Import List Items with Managed Metadata Field from CSV File

    Hello,
    I try to import list items from a CSV File. Most of the fields are populating correctly except the Managed Metadata Field. I found multiple examples on how to set Managed Metadata Fields with Powersehll, but unfortunately I couldnt get it running.
    The CSV File holds values for the Metadata Column, this value should be checked against the Metadata in the Termstore. If this Term is existent, then it should set the fields value, if it is not existant then it should add the term from the CSV File to the
    Term Set in the Term Store. Can anybody give me a tip on how to do this? This is what I have, where Line 4 holds the Metadata:
    $Siteurl = "http://siteUrl"
    $Rootweb = New-Object Microsoft.Sharepoint.Spsite($Siteurl);
    $Webapp = $Rootweb.Webapplication
    $listName = "Catalogue"
    $listWeb = Get-SPWeb $Siteurl
    $list = $listWeb.Lists[$listName]
    $pfad1 = "c:\temp\Servers.csv"
    $content = import-csv -Delimiter ";" -Path $pfad1 
    foreach ($line in $content) {
    $newItem = $list.Items.Add()
    $newItem["Field 1"] = $line.1
    $newItem["Field 2"] = $line.2
    $newItem["Field 3"] = $line.3
    $newItem["Field 4"] = $line.4
    $newItem.Update()
    write-host $line.Title imported
    Thanks!!

    Hi Jimmie,
    From your description, when importing list from csv to SharePoint site, you would like to compare if Managed Metadata column exists in term store, and return yes value, if not, add it to term store.
    That might need script to achieve. You need to import list at first, then get value from term store, and compare with the list. Change the list field per comparison result, then add new value to term store.
    However, there might some workaround to meet your requirement. Not surly understand, so I find some references for you:
    If you would like to export Term Set to CSV from SharePoint 2013, then you could compare it:
    http://gallery.technet.microsoft.com/office/PowerShell-for-SharePoint-a838b5d0#content
    If you would like to query SharePoint 2013 Managed metadata term store using JavaScript:
    http://sharepoint.stackexchange.com/questions/60045/query-sp2013-managed-metadata-term-store
    http://stackoverflow.com/questions/13858962/getting-all-the-term-stores-in-sharepoint-2010-web-services-or-client-side-obje
    If you would like to synchronize, import or copy term store & managed metadata in SharePoint between environments:
    http://www.matthewjbailey.com/synchronize-import-or-copy-term-stores-managed-metadata-in-sharepoint/
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for