locked
Detail view RRS feed

  • Question

  • Hi I want to create a summary page for customers. I want to have the page filter on a querystring that is the customer ID and display the details of the customer in a detailed view. I would also like to display a list of contacts that relate to that customer in a list. Can anyone talk me through the best way to do this.
    Chris
    Thursday, September 1, 2011 9:05 PM

Answers

  • Hi there,

    Really not much to it.

    First you need a way to get the parameter in the querystring. I don't know how you are going to route the customers to that page, but you have a lot of possibilities there.

    Then the page. Just create a new page and add a querystring filter on it. Drop your webparts that you want to show (lists of contacts etc) on the page. Now connect the filter to the webparts and it will filter out.

     

    Now, if you want to show only the data for the customer, and not a list, you can open up SharePoint Designer and add a dispform as a dataview on the page.


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    • Proposed as answer by Morgan de Jonge Friday, September 2, 2011 7:35 AM
    • Marked as answer by GuYuming Wednesday, September 14, 2011 1:28 AM
    Friday, September 2, 2011 7:23 AM

All replies

  • Hi there,

    Really not much to it.

    First you need a way to get the parameter in the querystring. I don't know how you are going to route the customers to that page, but you have a lot of possibilities there.

    Then the page. Just create a new page and add a querystring filter on it. Drop your webparts that you want to show (lists of contacts etc) on the page. Now connect the filter to the webparts and it will filter out.

     

    Now, if you want to show only the data for the customer, and not a list, you can open up SharePoint Designer and add a dispform as a dataview on the page.


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    • Proposed as answer by Morgan de Jonge Friday, September 2, 2011 7:35 AM
    • Marked as answer by GuYuming Wednesday, September 14, 2011 1:28 AM
    Friday, September 2, 2011 7:23 AM
  • Got the querystring filter working. Two more questions:

    If I have a list of customers is there an easy way to add a hyperlink column which includes the id in it's URL e.g. /customersummary.aspx?id={ID}. I am sure this must be easy but I can't find anything.

    Could you go into more detail about the disp form. I am trying to create a "dashboard" for the customer so I want to display the customer detail at the top and the various lists filtered on that customer.

    Cheers Chris.


    Chris
    Friday, September 2, 2011 12:36 PM
  • Hi ,

    adding a hyperlink column is not that hard, like you tought. You can do that in 2 ways:

    - create a hyperlink via a workflow in a calculated column, and parse the html output (http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/)

    - other way is to change that list into a dataview (via sharepoint designer): on your page, delete the customer list and add a dataview with the customer list as source. There you can just create an extra column in the table and add a hyperlink there with ID as parameter. I don't have link to show you how it works, but you should manage.

     

    About the dispform: I would create a new page (in the site pages for example). add the querystring filter and the lists. Connect the filter and the lists. Now, the lists will only show the values that are filtered by the filter.

    To show a detail view of an item, open the site in SharePoint Designer: open the page, and insert a "display item form". Connect that as well to your filter.

    that should do the trick.


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    Friday, September 2, 2011 2:29 PM