This project is read-only.

Trouble with Filtering and Formatting Date Values

Sep 23, 2010 at 9:49 PM

Hi - thought I would post here because I don't think my post was being added to the original site that I got these instruction from and you reference this site quite a bit (http://blogs.msdn.com/b/sharepointdesigner/archive/2008/02/25/filtering-and-formatting-with-date-values.aspx?PageIndex=1#comments).  This was a very valuable post, but I am having an issue with offsetDays portion of the SelectCommand.  I have set OffsetDays to and negative 7 and I know that I have 3 items that meet that criteria, but only 2 items are displaying in the dataview webpart.  So I added a 4th item to see what affect that would have on what is displaying but still just the same two items are displaying.  Below is my SelectCommand within the AggregateDataSource. 

<SharePoint:AggregateDataSource runat="server" IsSynchronous="" SeparateRoot="" RootName="" RowsName="" ID="dataformwebpart1"><Sources><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Leq&gt;&lt;FieldRef Name='Created'/&gt;&lt;Value Type='DateTime'&gt;&lt;Today OffsetDays='-7'/&gt;&lt;/Value&gt;&lt;/Leq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>

Maybe someone on this forum can provide some insight as to what the issue could be.

I am using SharePoint 2010 and SharePoint Designer 2010 on Windows Server 2008 R2 (64-bit).

Thanks!

Coordinator
Sep 24, 2010 at 3:09 AM

jriesen:

It looks like you have <Leq> in your Where clause. So this means that you are looking for items which have a created date (@Created) 7 or more days ago. Is this what you are trying to retrieve? Can you post the values you have in the 4 items so that we can work this through?

M.

Sep 24, 2010 at 6:15 PM

My goal is to filter on discussion items that are <= [Today]-7 ... so discussion items within the last 7 days.  I think I got the formula right, but math is not my strong suite.  I realized for one thing since I submitted my original post that I should have been filtering on Last Updated so I change the SelectCommand as follows:

SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Leq&gt;&lt;FieldRef Name='DiscussionLastUpdated'/&gt;&lt;Value Type='DateTime'&gt;&lt;Today OffsetDays='-7'/&gt;&lt;/Value&gt;&lt;/Leq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;"

Unfortunately, still the same issue persists.

Here is my data:  (Keep in mind that these come from an aggregated datasource of several discusson boards - each item is in a separate discussion board.)

Subject Created By Replies Last Updated Item Type Path
Use SharePoint Discussion List in place of SCS Forum SUPERIOR\Jriesenberg 0 9/22/2010  4:47:55 PM Folder forum/Lists/Idea
Click-once deployment across the Internet SUPERIOR\Jriesenberg 0 9/22/2010  4:49:05 PM Folder forum/Lists/NET
Sitemap Permissions SUPERIOR\Jriesenberg 0 9/22/2010  4:53:09 PM Folder forum/Lists/SharePoint

 Here is the code for the dataview webpart:

 

<WebPartPages:DataFormWebPart runat="server" Description="" PartOrder="2" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="True" DataSourceID="" Title="Recent Discussions" ViewFlag="8" NoDefaultStyle="TRUE" AllowConnect="True" FrameState="Normal" PageSize="-1" PartImageLarge="" AsyncRefresh="True" ExportMode="All" Dir="Default" DetailLink="" ShowWithSampleData="False" ListId="00000000-0000-0000-0000-000000000000" ListName="" FrameType="TitleBarOnly" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ManualRefresh="False" ChromeType="TitleOnly" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" ViewContentTypeId="" InitialAsyncDataFetch="False" MissingAssembly="Cannot import this Web Part." HelpMode="Modeless" ID="g_1ca77b34_1651_4a5c_923e_2508e2e49204" ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" IsIncludedFilter="" __MarkupType="vsattributemarkup" __WebPartId="{1CA77B34-1651-4A5C-923E-2508E2E49204}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><ParameterBindings>
       <ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
       <ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
       <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
       <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
      </ParameterBindings>
<DataFields>


@ID,ID;@ContentType,Content Type;@Title,Subject;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;@ItemChildCount,Replies;@FolderChildCount,Folder Child Count;@Body,Body;@MyEditor,Modified By (picture and name);@DiscussionLastUpdated,Last Updated;@DiscussionTitleLookup,Discussion Title;@ThreadIndex,Thread Index;@ParentFolderId,Parent Folder Id;@GUID,GUID;@MessageId,Message ID;@TrimmedBody,Trimmed Body;@ShortestThreadIndexId,Shortest Thread-Index Id;@ShortestThreadIndexIdLookup,Shortest Thread-Index Id Lookup;@EmailSender,E-Mail Sender;</DataFields>
<Xsl>

 

<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:agg="http://schemas.microsoft.com/sharepoint/aggregatesource" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
 <xsl:output method="html" indent="no"/>
 <xsl:decimal-format NaN=""/>
 <xsl:param name="dvt_apos">&apos;</xsl:param>
 <xsl:param name="ManualRefresh"></xsl:param>
 <xsl:variable name="dvt_1_automode">0</xsl:variable>
 <xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:agg="http://schemas.microsoft.com/sharepoint/aggregatesource" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
  <xsl:choose>
   <xsl:when test="($ManualRefresh = 'True')">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
      <td valign="top">
       <xsl:call-template name="dvt_1"/>
      </td>
      <td width="1%" class="ms-vb" valign="top">
       <img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
      </td>
     </tr>
    </table>
   </xsl:when>
   <xsl:otherwise>
    <xsl:call-template name="dvt_1"/>
   </xsl:otherwise>
  </xsl:choose>
 </xsl:template>
 
 <xsl:template name="dvt_1.empty">
  <xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>
  <table border="0" width="100%">
   <tr>
    <td class="ms-vb">
     <xsl:value-of select="$dvt_ViewEmptyText"/>
    </td>
   </tr>
  </table>
 </xsl:template>
 <xsl:template name="dvt_1">
  <xsl:variable name="dvt_StyleName">RepForm1</xsl:variable>
  <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
  <xsl:variable name="dvt_RowCount" select="count($Rows)" />
  <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" />
  <xsl:choose>
   <xsl:when test="$dvt_IsEmpty">
    <xsl:call-template name="dvt_1.empty" />
   </xsl:when>
   <xsl:otherwise>
    <table border="0" width="100%">
     <xsl:call-template name="dvt_1.body">
      <xsl:with-param name="Rows" select="$Rows" />
     </xsl:call-template>
    </table>
   </xsl:otherwise>
  </xsl:choose>
 </xsl:template>
 <xsl:template name="dvt_1.body">
  <xsl:param name="Rows" />
  <xsl:for-each select="$Rows">
   <xsl:sort select="@DiscussionLastUpdated" order="descending" />
   <xsl:call-template name="dvt_1.rowview" />
   
  </xsl:for-each>
 </xsl:template>
 <xsl:template name="dvt_1.rowview">
  <tr>
   <td width="100%" colspan="2" class="ms-vb">
    <b>
     <a href="{@FileRef}"><xsl:value-of select="@LinkTitle" /></a>
    </b>
   </td>
  </tr>
  <tr>
   <td width="100%" colspan="2" class="ms-vb">
    Last Updated:
    <xsl:value-of select="ddwrt:FormatDate(string(@DiscussionLastUpdated),1033, 5)" />
    <br /><br /></td>
  </tr>
  <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
   <tr>
    <td width="100%" colspan="2" class="ms-vb">
     <span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view" />
    </td>
   </tr>
  </xsl:if>
 </xsl:template>
</xsl:stylesheet></Xsl>
<DataSources>
<SharePoint:AggregateDataSource runat="server" IsSynchronous="" SeparateRoot="" RootName="" RowsName="" ID="dataformwebpart1"><Sources><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Leq&gt;&lt;FieldRef Name='DiscussionLastUpdated'/&gt;&lt;Value Type='DateTime'&gt;&lt;Today OffsetDays='-7'/&gt;&lt;/Value&gt;&lt;/Leq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{EA3DEDC9-0588-4B72-9016-827E46B140F5}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{EA3DEDC9-0588-4B72-9016-827E46B140F5}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{EA3DEDC9-0588-4B72-9016-827E46B140F5}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{EA3DEDC9-0588-4B72-9016-827E46B140F5}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{78BE5DE3-BB21-4388-AFFD-FE61FEC68FD7}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{78BE5DE3-BB21-4388-AFFD-FE61FEC68FD7}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{78BE5DE3-BB21-4388-AFFD-FE61FEC68FD7}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{78BE5DE3-BB21-4388-AFFD-FE61FEC68FD7}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{7BC49C77-5FDC-45E2-AF24-8D2483D6A85D}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{7BC49C77-5FDC-45E2-AF24-8D2483D6A85D}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{7BC49C77-5FDC-45E2-AF24-8D2483D6A85D}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{7BC49C77-5FDC-45E2-AF24-8D2483D6A85D}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{67BA1AE8-F35C-4F6A-95BF-60F6852197CC}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{67BA1AE8-F35C-4F6A-95BF-60F6852197CC}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{67BA1AE8-F35C-4F6A-95BF-60F6852197CC}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{67BA1AE8-F35C-4F6A-95BF-60F6852197CC}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{3A7BC2BE-CC1F-4A13-B340-A91052C94663}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{3A7BC2BE-CC1F-4A13-B340-A91052C94663}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{3A7BC2BE-CC1F-4A13-B340-A91052C94663}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{3A7BC2BE-CC1F-4A13-B340-A91052C94663}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{515918FD-6C63-4A9A-889E-A978CB43C354}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{515918FD-6C63-4A9A-889E-A978CB43C354}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{515918FD-6C63-4A9A-889E-A978CB43C354}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{515918FD-6C63-4A9A-889E-A978CB43C354}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{8F82EEA9-3398-46EE-9CB7-828B06F7B0BA}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{8F82EEA9-3398-46EE-9CB7-828B06F7B0BA}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{8F82EEA9-3398-46EE-9CB7-828B06F7B0BA}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{8F82EEA9-3398-46EE-9CB7-828B06F7B0BA}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{1D87253E-26E1-4F66-BC8F-F9B3C9B61144}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{1D87253E-26E1-4F66-BC8F-F9B3C9B61144}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{1D87253E-26E1-4F66-BC8F-F9B3C9B61144}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{1D87253E-26E1-4F66-BC8F-F9B3C9B61144}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{C9BFF81C-E245-46D3-99AD-B7FBEE662E60}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{C9BFF81C-E245-46D3-99AD-B7FBEE662E60}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{C9BFF81C-E245-46D3-99AD-B7FBEE662E60}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{C9BFF81C-E245-46D3-99AD-B7FBEE662E60}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{FC1E143F-F210-4A79-A144-C9BD6056BB43}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{FC1E143F-F210-4A79-A144-C9BD6056BB43}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{FC1E143F-F210-4A79-A144-C9BD6056BB43}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{FC1E143F-F210-4A79-A144-C9BD6056BB43}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{D2B64C8D-0132-44FF-95A0-638E3C6AECA0}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{D2B64C8D-0132-44FF-95A0-638E3C6AECA0}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{D2B64C8D-0132-44FF-95A0-638E3C6AECA0}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{D2B64C8D-0132-44FF-95A0-638E3C6AECA0}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{30803F5D-DAE1-45A5-8DB1-DF17284B500B}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{30803F5D-DAE1-45A5-8DB1-DF17284B500B}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{30803F5D-DAE1-45A5-8DB1-DF17284B500B}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{30803F5D-DAE1-45A5-8DB1-DF17284B500B}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;/View&gt;" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{D51C1BF0-15CA-4627-BF01-90AF24549C7A}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{D51C1BF0-15CA-4627-BF01-90AF24549C7A}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{D51C1BF0-15CA-4627-BF01-90AF24549C7A}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{D51C1BF0-15CA-4627-BF01-90AF24549C7A}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource>
</Sources><Aggregate><concat name="data source"><datasource name=".NET" id="0" Type="SPList"/><datasource name="Best_Practices_and_Patterns" id="1" Type="SPList"/><datasource name="General" id="2" Type="SPList"/><datasource name="Idea" id="3" Type="SPList"/><datasource name="Microsoft_Office" id="4" Type="SPList"/><datasource name="Networking" id="5" Type="SPList"/><datasource name="Operating_Systems" id="6" Type="SPList"/><datasource name="Outlook" id="7" Type="SPList"/><datasource name="SharePoint" id="8" Type="SPList"/><datasource name="SQL_Server" id="9" Type="SPList"/><datasource name="Team_Foundation_Server" id="10" Type="SPList"/><datasource name="Web_Design" id="11" Type="SPList"/><datasource name="Miscellaneous" id="12" Type="SPList"/></concat></Aggregate>
</SharePoint:AggregateDataSource>
</DataSources>
</WebPartPages:DataFormWebPart>

Now, I am having another frustrating issue with the page where I am using the dataview webpart.  Now all the listviews I have on the page for the individual discussion boards is showing an error when viewed in the browser:   Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

The listviews look fine when I have the page open in SharePoint Designer ... argh!

Coordinator
Sep 24, 2010 at 6:46 PM

I notice a couple of things:

  • This looks like SP2010 (the ManualRefresh was the giveaway). I haven't played with Discussion in 2010 yet, so I may not have the right answers.
  • You've explicitely added each Discussion list to the AggregateDataSource. Would CrossList be more what you want?
  • Do you want to display *threads* that have been updated, or *items* which have been updated? There are two Content Types in Discussions in 2007: Discussion and Message.
  • The "Unable to display.." message is the generic "You did something wrong" message. If you see something different in SPD than in the browser, it *usually* means that the context is different somehow.

M.

 

Sep 24, 2010 at 8:47 PM

Yes, sorry, I am using SP2010.  :-)

Since I am a novice with SharePoint Designer I am not aware of a CrossList option.  If you think that makes more sense, I would take your word for it.  I just want to display "threads" that have been updated.

The "Unable to display" issue I have resolved.

Thanks!