"Exceeded data fetch limit" on DispForm pages with List View connections: the work-around - SharePoint Zen - ROXORITY ™ Sensational SharePoint Solutions
User Voices
(Loading...)
Our blog on SharePoint add-ons and solutions development
« Enabling CAML Filtering Mode for Data View Web Parts | Main | Filtering SQL Data View Web Parts in SharePoint »
Wednesday
Mar172010

"Exceeded data fetch limit" on DispForm pages with List View connections: the work-around

The Requirement

  • You have two related Lists, such as for example Customers and Orders.
  • The latter contains a Lookup Column pointing to the Customer of each and every Order.
  • On the Display Form (DispForm.aspx) of each and every Customer, you'd like to show all its Orders.

How can you achieve this? Let us find out in this article.

Adding the List View to your DispForm page

What you should not do is add the List View directly to the DispForm page in the way you're used to (by clicking Add a Web Part and in the Add Web Parts dialog selecting your Orders List under under Lists and Libraries).

That's because Web Part connections don't work for List Views on List Form pages for some reason, and you'll need a Web Part Connection later on. Instead, you should perform the above steps on any other kind of Web Part page, ideally a temporary one that you created just for this purpose. So add the Orders List to that other page of yours, customize its View in any way you like, then open that very page in SharePoint Designer.

Right-click your List View Web Part and choose Convert to XSLT Data View. After the conversion, click the Web Parts chevron at its top-right corner to show the Common Data View Tasks panel. Click Data View Properties and in the Data View Properties dialog, on the General tab, untick the SharePoint List Toolbar checkbox. Click OK, right-click the Web Part again and pick Web Part Properties. Expand the Miscellaneous section and make sure you set the following properties as shown below:

After saving your changes, navigate a-new to the page in your web browser and Export your custom List View Web Part somewhere to your file system. Now go to your Customers List and click any of its items to bring up your DispForm.aspx. Append &DisplayMode=Design to its URL in the browser address bar and hit Enter since there is no Edit Page command in your Site Actions menu for that page. Import to the page the Web Part file you just exported to your file system. Voila! Your List View is there, and now it's "just" a matter of telling it to show only Orders pertaining to the current Customer.

Preparing your Filter Web Part

I don't know about any other filter provider Web Parts for this particular scenario, but after you add FilterZen to this same List Form page and try to connect it to your XSLT Data View Web Part (your Orders List), you will notice when trying to connect the two that you still get stuck with the message that "this page has exceeded its data fetch limit for connected Web Parts"!

So don't even try the standard connection types that FilterZen offers you right now at this point, and if you tried, disconnect the two Web Parts again. FilterZen does support another mode that works even in this scenario, but first you'll need to set it up fully.

After disconnecting FilterZen, if applicable, you'll need to set up your filter first before being able to re-connect in a special mode. Since the Orders List has a Lookup Column to the Customers List, we want to filter the Orders List to only show items with the Customer Column set to the one currently displayed in the DispForm.aspx. The simplest way to do this is to add a new "SharePoint Context Filter" to your FilterZen Web Part. Give it the same name as the Lookup Column in the Orders List (Customer in our example). Where the filter editor asks you to Select a context object and property, pick Library or List Item and below, pick Title. You don't need to set any other properties of this filter.

Connecting your Filter Web Part

Clicking Apply takes you back to the FilterZen Web Part settings tool-pane. Scroll down to the Advanced Filtering Settings section. From the drop-down list labelled Allow the Connection type 'Send Transformable Values' for, select your own filter and then click OK to save all your FilterZen modifications. Now open the Connections sub-menu of the FilterZen Web Part and you'll see a new connection type being offered at its bottom: Send Transformable 'Customer' Values To. In this sub-menu, choose the only Web Part on offer which is your XSLT Data View Web Part showing your Orders List. In the Choose Connection dialog now popping up, keep the pre-selected Connection Type choice of Get Filter Values From, and click Configure. On the Configure Connection tab, for the Consumer Field Name pick the Customer Lookup Column and click Finish.

That's it: you're done, and each Customer DispForm.aspx page now displays its related Orders (or whatever related information it is you are connecting)!

Reader Comments (2)

Thank you so much! This really helped me solving an issue that kept me searching workarounds for weeks!

February 23, 2012 at 21:45 | Unregistered CommenterJorgen

this was create thank you so much for putting this up, i have been looking for this for a long time, FYI after the import you can simply use the Page Field Fitler to set the filter.

December 19, 2012 at 3:39 | Unregistered CommenterNefi B
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.