20 thoughts on “SharePoint Metadata: Filter Page Web Parts

  1. Stefan Bauer (@StfBauer)

    Hi,

    the problem in my script is that your code is based on is, that i only requests site columns from the root web, but not from the current web or from a lists. You will need to add some additional logic to detect the list or web column. The problem you also have is that it will only works with field call “dept” because you render the link with a fixed value instead of the variable you declared in the head.

    Kind regards
    Stefan Bauer

    Reply
    1. David Lozzi Post author

      Thanks for the heads up Stefan, just updated the code. Also added a comment to note how to change the web reference to use the current web vs root web. Best practice, site columns should be run off the root web anyway ;).

      Reply
  2. Dallas

    I followed the instructions, but it just tries to load the term set forever. Are there any other dependancies, like the publishing feature or something? Anything I need to do with spservices beyond uploading it to the library? Thanks!

    Reply
    1. David Lozzi Post author

      The areas you need to modify in the script are below. Ensure the path to SPServices is correct, and you’re using the correct metaFieldName

      var metaFieldName = “Dept”; //Change to your site column names

      Reply
      1. Dallas

        Right, so I changed the name to “Specialty”, which is the title of my column, and the addresses are definitely right, they work in a browser. I’ve tried both relative URL’s and the full URL’s. Still just stuck on “loading your terms”. It’s a site column that was pushed from a content type hub, if that matters. I’ve tried other site columns though with the same result.

      2. David Lozzi Post author

        Can you post your response to the discussion board on CodePlex?

        And the site columns are in the root site of the site collection? Is the site collection URL the root? Or is it in a subfolder? I don’t know what’s going on, trying to figure out your environment.

        I’ll see about adding some more error handling in the script.

  3. bogatyrev

    I guess i have same problem. While opening in IE, there is JavaScript error: console is not defined and “loading your terms” on web part. However, in Chrome works fine. Any ideas?

    Reply
  4. Raj

    To address bogatyrev issue (if not already resolved), comment out the console.log lines within the script tag. This an IE only strange issue. To get the code to work with the console.log you need to enable the Developer Tools pane (IE 8, IE 9 etc) either by clicking F12 or via the settings option. Other clever browsers usually tend to ignore the “console” statement if debugging view is not enabled. Hope it helps

    Reply
  5. Charlie

    I am still getting the noted error even though the web part has the site column needed. I can see all my managed metadata terms, yet upon clicking one of them I get the same error as if my web part did not contain the site column.

    Reply
  6. Thomas

    Hello,

    I have a problem with the code, i can load the Parent terms but not the child terms. If i have a term set with Terms that have no child term everything loads, but if there are children it seems to load forever, is there any reasons why this happens?

    Reply
  7. Paul Federwitz

    I had a problem with getting the list of keywords because my metadata field was on a subsite, not the root. I moved it to the root and now I am getting the list of Keywords. The problem is that when I click on one of the keywords I get the error “One or more field types are not installed properly. Go to the list settings page to delete these fields.”

    Googling that showed other people getting the error from SPServices when the site column name has a space in it, as mine does. As suggested I switched to the internal name of Development_x0020_Customers. I am still getting the list of keywords, but when I click on one of the terms I get the same error above. Any ideas?

    Reply
      1. Paul

        FYI, I created a new site column that does not have a space in it (DevCustomers) and used the same managed metadata list and that fixed it. My internet access is not the greatest which complicates my testing, but from the best I can tell this is an issue. What I wanted to go back and test was what happened if I renamed the site column to have a space in it. I had renamed the old site column to not have a space in it but that did not fix it. I believe that is because the internal name still had the x0020 in the middle.

  8. eniachakauya

    Hey

    Thanks a lot, got it to work. Just got one question…Is there a way to customise it so that it searches in folders as well? I have a document library I added on my page as a web part (the document library has folders in it), the filter seems to only filter or find material that is not in a folder.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s