locked
Filter Dataview added to DispForm page RRS feed

  • Question

  • I have customized the DispForm.aspx of a list to display Related Documents for for a project.

    Project has a web site and a document library. I created a custom dataview (with a bamboo solution) that will display each document marked as "Public" (choice field -> Yes/No).^This dataview search for document in each project site and add them if they are marked as "Public".

    Now I added this dataview on the DispForm page of the list so when a user will go on the project page, he will see public documents that concern this project. The problem is that actually the dataview display all the public documents that comes from every project site. I want to display public document for this specific project.

    I need to create a filter on the dataview (in SharePoint Designer) but I don't have any idea about how I can do that. the dataview is created by a custom Bamboo solution but works as a classic one.

    The only information that I can use is the "source site" that copme from the dataview for each item. I indicate from which project site comes the public document. I want to use it because I have a "Site Url" field on my project. I only want to display document where "Source Site" = "Site Url".

    But I don't know how to get the "Site Url" of my project item to make a filter on my dataview.

    Suggestions?

    Thank you.

    Friday, July 8, 2011 11:16 AM

Answers

  • Hi Djai-Dev,

    From your description, I understand that you want to create a filter on your custom dataview, filter the documents for this specific project. There is a “source site” field in the documents, and the project has a “Site Url” field. If I have any misunderstanding, please feel free to let me know.

    If so, you can use the web part connections to filter the data view:

    1.        Create a custom list form for your project item on DispForm.aspx(Create a custom list form)

    2.        Add your custom data view.

    3.        Choose Web Part Connections in the Common Data View Tasks.(Connect two data views)

    4.        In the Web Part Connections Wizard, choose Get Filter Values From, set project “Site Url”=document “Source Site”

    Here is a similar issue, for more information, please refer to:

    http://social.technet.microsoft.com/Forums/en-US/sharepointcustomization/thread/0a47c451-5484-4ecf-8942-e01a776070c7

    Thanks,

    Qiao Wei

    • Marked as answer by Wayne Fan Monday, July 18, 2011 5:59 AM
    Tuesday, July 12, 2011 9:40 AM
    Moderator