locked
Many-to-Many and One-to-Many Relationships RRS feed

  • Question

  • I have inherited a project originally created in Access that is basically a data visualization tool, built by a power user without the knowledge or assistance of IT. For what it is used for I think PivotViewer would be a good tool. However the is an issue of a catagory having multiple facets. It is a collection of parts and each part might be used in multiple product lines. How would I go about creating this in PivotViewer?

    For example: part ABC-1234 is a top level part used in the construction product line. But then this same part is a component of a part used in the Mining product line. So the user might want to see all parts that are used in both mining and construction regardless of if the the parts are used in both product lines or in only one of the product lines. If you have more than just threee product lines making each product line a catagory would be impractical. The only option I can think of is that I create a parent control that provides "top level" filters and the user makes the selection which then creates a dynamic collection to be displayed by the PivotViewer control. This seems like more work than I really want to do, though. So I am wondering if any of you could offer some suggestions.

    Friday, December 3, 2010 10:28 AM

Answers

  • For example: part ABC-1234 is a top level part used in the construction product line. But then this same part is a component of a part used in the Mining product line. So the user might want to see all parts that are used in both mining and construction regardless of if the the parts are used in both product lines or in only one of the product lines.

    If you have a facet 'Product Line' you can assign multiple facet values to your part ABC-1234. The cxml would look similar to the Tag and Speakers facets in this sample:

    <?xml version="1.0" encoding="utf-8"?>
    <Collection xmlns:p="http://schemas.microsoft.com/livelabs/pivot/collection/2009" SchemaVersion="1.0" Name="PDC2010 Agenda" p:AdditionalSearchText="Collection built and data collated by Xpert360 Ltd" xmlns="http://schemas.microsoft.com/collection/metadata/2009">
      <FacetCategories>
        <FacetCategory Name="Live Channel" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Speakers" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Room" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Tag" Type="String" p:IsFilterVisible="false" p:IsWordWheelVisible="false" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Active Content" Type="Link" p:IsFilterVisible="false" p:IsWordWheelVisible="false" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Calendar" Type="Link" p:IsFilterVisible="false" p:IsWordWheelVisible="false" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Time" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
      </FacetCategories>
      <Items ImgBase="PDC2010_files/images.xml" HrefBase="http://player.microsoftpdc.com/">
        <Item Id="0" Img="#0" Name="PDC10 keynotes with Steve Ballmer and Bob Muglia" Href="/">
          <Description>PDC10 keynotes with Steve Ballmer and Bob Muglia</Description>
          <Facets>
            <Facet Name="Live Channel">
              <String Value="Keynote" />
            </Facet>
            <Facet Name="Speakers">
              <String Value="Steve Ballmer" />
              <String Value="Bob Muglia" />
            </Facet>
            <Facet Name="Tag">
              <String Value="Keynote" />
              <String Value="WP7" />
              <String Value="Windows Azure" />
              <String Value="Cloud" />
              <String Value="Silverlight" />
              <String Value=".NET" />
            </Facet>
    ...

    In the Excel tool you concatenate facet value in a cell seperated by a vertical bar '|'. See if that suits your needs and get back with any other patterns.

     

    Friday, December 3, 2010 12:44 PM

All replies

  • For example: part ABC-1234 is a top level part used in the construction product line. But then this same part is a component of a part used in the Mining product line. So the user might want to see all parts that are used in both mining and construction regardless of if the the parts are used in both product lines or in only one of the product lines.

    If you have a facet 'Product Line' you can assign multiple facet values to your part ABC-1234. The cxml would look similar to the Tag and Speakers facets in this sample:

    <?xml version="1.0" encoding="utf-8"?>
    <Collection xmlns:p="http://schemas.microsoft.com/livelabs/pivot/collection/2009" SchemaVersion="1.0" Name="PDC2010 Agenda" p:AdditionalSearchText="Collection built and data collated by Xpert360 Ltd" xmlns="http://schemas.microsoft.com/collection/metadata/2009">
      <FacetCategories>
        <FacetCategory Name="Live Channel" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Speakers" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Room" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Tag" Type="String" p:IsFilterVisible="false" p:IsWordWheelVisible="false" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Active Content" Type="Link" p:IsFilterVisible="false" p:IsWordWheelVisible="false" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Calendar" Type="Link" p:IsFilterVisible="false" p:IsWordWheelVisible="false" p:IsMetaDataVisible="true" />
        <FacetCategory Name="Time" Type="String" p:IsFilterVisible="true" p:IsWordWheelVisible="true" p:IsMetaDataVisible="true" />
      </FacetCategories>
      <Items ImgBase="PDC2010_files/images.xml" HrefBase="http://player.microsoftpdc.com/">
        <Item Id="0" Img="#0" Name="PDC10 keynotes with Steve Ballmer and Bob Muglia" Href="/">
          <Description>PDC10 keynotes with Steve Ballmer and Bob Muglia</Description>
          <Facets>
            <Facet Name="Live Channel">
              <String Value="Keynote" />
            </Facet>
            <Facet Name="Speakers">
              <String Value="Steve Ballmer" />
              <String Value="Bob Muglia" />
            </Facet>
            <Facet Name="Tag">
              <String Value="Keynote" />
              <String Value="WP7" />
              <String Value="Windows Azure" />
              <String Value="Cloud" />
              <String Value="Silverlight" />
              <String Value=".NET" />
            </Facet>
    ...

    In the Excel tool you concatenate facet value in a cell seperated by a vertical bar '|'. See if that suits your needs and get back with any other patterns.

     

    Friday, December 3, 2010 12:44 PM
  • Thanks for the help. I was able to get that to work using the XML syntax but unable to using | in Excel. Any suggestions as to what I might have done wrong? I tried Mining|Construction in the cell. And it took that as a literal value into the XML.

    Monday, December 6, 2010 8:31 AM
  • Sorry I got that wrong! In Excel it is 2 vertical bars as in:

    Sync Framework||SQL Azure||Cloud||WP7||Silverlight||HTML 5

    Monday, December 6, 2010 9:01 AM
  • Thanks!

    Monday, December 6, 2010 1:16 PM