问题 Filter Web Part in Custom Display Form by Managed Metadata

  • 2012年6月13日 16:22
     
     

    Hi All,

    I have created a custom Display Form for a list (List A) and have added a Data View of another list (List B) in the custom Display Form. I want to be able to have List B filtered by a value in List A (ex. If List A has a Field name "Supplier Name", only show the items in List B that contain the "Supplier Name").

    I can add the data view without issue, and try to Filter, but I can pull any values from List A to compare against. I can create a Web Part Connection so that List B has a filter link, but that is not the desired behavior. The behavior should be just a list that is already filtered to show only the correct items.

    How do I filter my List B web part in SharePoint Designer to acheive the goal?

    Thanks!

    Kelly


    Personal Blog: http://thebitsthatbyte.com


全部回复

  • 2012年6月13日 16:45
     
     

    ... and I followed the instructions here: http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/697903ca-2cab-4b3c-90fd-41d1d76062ee

    But when I get to the dialog that is supposed to have columns listed, none are there!


    Personal Blog: http://thebitsthatbyte.com

  • 2012年6月13日 18:34
     
     
    Not sure if this changes anything, but my the fields I want to compare are using Managed Metadata.

    Personal Blog: http://thebitsthatbyte.com

  • 2012年6月13日 18:46
     
     
  • 2012年6月13日 19:59
     
     
    Thanks Victor. I had looked at that one already and just came up with the obvious answer. Linked Datasources! As soon as I joined the datasources, I was able to filter the data I needed since I could compare the data.

    Personal Blog: http://thebitsthatbyte.com

  • 2012年6月13日 20:24
     
     
    Correction. I thought I had it... When filtering a Linked Data Source, it seems to retrieve the filter values on the first item, so that when I open the second item in List 1, it is not pulling in the related contents from List 2, as the second item has different values.

    Personal Blog: http://thebitsthatbyte.com

  • 2012年6月13日 20:45
     
     

    So, after going round and round. I know what I need:

    Pass a paramater from List 1 that is in the Display Form to be used for comparison in my filter of List 2.

    The problem is, I can't seem to find a way to pass the parameter thru.


    Personal Blog: http://thebitsthatbyte.com

  • 2012年6月14日 14:01
     
     

    I now have it filtering by the following method:

    1) Instead of creating a linked data source in the Data Sources area, I linked off of the main list presented in the Display Form to the Sub List I wanted.

    2) I created an Empty Data View and inserted the appropriate fields from the linked sub list.

    3) I used a Filter to filter by a field using a Contains statement.

    This works to present the values... but the issue I am running into now is that since I am using multiple terms from a Managed Metadata field with a contains statement, if I have a item named Number 1 and another named Number 10, they both show up because they both "contain" Number 1. Any ideas around this?


    Personal Blog: http://thebitsthatbyte.com