locked
SharePoint Dynamic List View RRS feed

  • Question

  • My client wants to store all the support documents in a SharePoint library and these documents belong to different applications such as cognos, etl etc.. Now in order to help the end users to retrieve these docs faster I added a column in the library with an 'application choice' dropdown that categorizes them. 

    My requirement now is to give the users a webpage with a gridview that lists out the name of the application and it should also display a link that takes to the particular view that automatically sorts out only the documents belonging to that very application.

    I can create all the views for these odd fifty applications but it's quite laborious. I was wondering if someone can suggest an better solution that would create these views dynamically.

     

    Thanks

    Friday, May 6, 2011 6:11 PM

Answers

  • You have a couple of options, maybe the most straight forward is"

    1) In SharePoint Designer Drop a DataViewWebPart on the page that is a list of your documents.

    2) At the top right of your DVWP in SPD you will see a little "chevron" button that brings up a menu of "Common DataView Tasks"... click the chevron and choose "Parameters"

    3) From the dialog that pops up click "New Parameter"

    4) Give it a name off "ApplicationName" or whatever you want

    5) from the "Parameter Source" Drop down select "Query String"

    6) In the "Query String Variable" text box put "AppName" and click ok

    7) No in the "Common Data View Tasks" menu select "Filter"

    8) In the filter Criteria dialog click on "Click here to add a new clause"

    9) Under "Field Name" select the field name of your "Application Name" field you mention above

    10) under "Comparison" select 'equals'

    11) Under "Value" select "[AppName]" (the parameter you created in step #6)

    12) Press OK

    13) Save the page

     

    To test.. in your browser go to http://urltopage/page.aspx?AppName=One of your App names

     

    That should be all you have to do. If you need more direction I can try to throw together a quick video on the subject.  

     

    Good luck,
    Mark 

     

    • Marked as answer by Emir Liu Monday, May 16, 2011 9:21 AM
    Friday, May 6, 2011 7:35 PM
  • Just writing to suggest another approach in addition to what Mark suggested.

    1. Create a web part page

    2. Add the document library as a web part to the page you created above. Use your default "All Documents" view for the library.

    3. Add a SharePoint List Filter web part and configure it to get values from the "Category" field of your document library

    4. Connect the web parts you created in above 2 steps.

    Now, the user can choose a category  from the web part you created in Step #3 and the document library will automatically filter and show documents from that category.

    BTW, what version of SharePoint are you working with? I'm on MOSS 2007. The above is the most simplest way and you can do all of that from the browser. However if you need more flexibility or depending on requirements, dataview created by SharePoint Designer will definitely help, as Mark explained in his post above.

    Hope that helps...

     


    Pman
    http://www.pmansLab.com/
    • Marked as answer by Emir Liu Monday, May 16, 2011 9:21 AM
    Saturday, May 7, 2011 3:44 PM

All replies

  • Just bite the bullet and create the Views manually.

    They are probably very similar so you'll be able to use an existing View when creating the next one (one of the options for creating a View is "Start from an existing View" where they are all listed).

    Typically in your case all the views will be the same but for the value of the field you have added and the name of the view. So it's not many seconds each.


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters

    Friday, May 6, 2011 6:28 PM
  • :) What you suggestion will definitely work...and 'stast with an existing view' will surely reduce a lot of my work.

     

    Thanks mate!!!

    Friday, May 6, 2011 6:35 PM
  • Is there a reason you could not pass the "Application Name" as a Query String variable to the page with a list view and filter the list by that Query String Variable? 

    Then you just have to create one view?

    Friday, May 6, 2011 6:39 PM
  • This sounds interesting; Can you tell me a little more on how to pass the application name as a query string variable to the page?

     

    Friday, May 6, 2011 6:47 PM
  • You have a couple of options, maybe the most straight forward is"

    1) In SharePoint Designer Drop a DataViewWebPart on the page that is a list of your documents.

    2) At the top right of your DVWP in SPD you will see a little "chevron" button that brings up a menu of "Common DataView Tasks"... click the chevron and choose "Parameters"

    3) From the dialog that pops up click "New Parameter"

    4) Give it a name off "ApplicationName" or whatever you want

    5) from the "Parameter Source" Drop down select "Query String"

    6) In the "Query String Variable" text box put "AppName" and click ok

    7) No in the "Common Data View Tasks" menu select "Filter"

    8) In the filter Criteria dialog click on "Click here to add a new clause"

    9) Under "Field Name" select the field name of your "Application Name" field you mention above

    10) under "Comparison" select 'equals'

    11) Under "Value" select "[AppName]" (the parameter you created in step #6)

    12) Press OK

    13) Save the page

     

    To test.. in your browser go to http://urltopage/page.aspx?AppName=One of your App names

     

    That should be all you have to do. If you need more direction I can try to throw together a quick video on the subject.  

     

    Good luck,
    Mark 

     

    • Marked as answer by Emir Liu Monday, May 16, 2011 9:21 AM
    Friday, May 6, 2011 7:35 PM
  • Appreciate this Mark; let me try this one

     

    Thanks!!!

    Friday, May 6, 2011 7:41 PM
  • Just writing to suggest another approach in addition to what Mark suggested.

    1. Create a web part page

    2. Add the document library as a web part to the page you created above. Use your default "All Documents" view for the library.

    3. Add a SharePoint List Filter web part and configure it to get values from the "Category" field of your document library

    4. Connect the web parts you created in above 2 steps.

    Now, the user can choose a category  from the web part you created in Step #3 and the document library will automatically filter and show documents from that category.

    BTW, what version of SharePoint are you working with? I'm on MOSS 2007. The above is the most simplest way and you can do all of that from the browser. However if you need more flexibility or depending on requirements, dataview created by SharePoint Designer will definitely help, as Mark explained in his post above.

    Hope that helps...

     


    Pman
    http://www.pmansLab.com/
    • Marked as answer by Emir Liu Monday, May 16, 2011 9:21 AM
    Saturday, May 7, 2011 3:44 PM