Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm deploying a DVWP and I'm looking to remove GUIDs references from the datasource.

This is fine for standard single satasources, but I'm having troubles with joined datasources.

Here's (a portion of) what SPD gave me to start with.

            <DataSources>
                <SharePointWebControls:aggregatedatasource runat="server" IsSynchronous="false" SeparateRoot="true" id="aggregatedatasource2">
                    <sources>
                        <SharePointWebControls:spdatasource runat="server" DataSourceMode="List" UseInternalName="true" selectcommand="&lt;View&gt;&lt;/View&gt;">
                            <SelectParameters>
                                <asp:Parameter Name="ListID" DefaultValue="{CF046268-D9EB-4428-B621-97D2D4B3021B}"/>
                            </SelectParameters>

I've replaced Name and the GUId to ListName and myListName, the part errors in the browser.

I've seen Marc's post but my tags are different. I've tried replacing values from the datasource in the post with my list values but no luck.

Any suggestions would be appreciated.

Thanks,

Dan.

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

Here is a sample for a session I give on Content Aggregation. You don't need the WebURL parameter if the list exists in the current site.

<SharePoint:SPDataSource runat="server"
   DataSourceMode="List"
   UseInternalName="True"
   UseServerDataFormat="True"
   selectcommand="<View></View>">
   <SelectParameters>
      <asp:Parameter Name="ListName" DefaultValue="Announcements"/>
      <asp:Parameter Name="WebURL" DefaultValue="/demos/contentquery/red/"/>
   </SelectParameters>
</SharePoint:SPDataSource>
share|improve this answer
    
That was it. Once I added in the WebURL it all came good. –  dan Apr 17 '11 at 22:47
add comment

Depending on how the AggregateDataSource is constructed, you may need to replace the word ListID with ListName twice in each parameter.

Also, as Chris alludes, you need the WebURL for any list which is not in the current site.

This trick absolutely works in AggregateDataSources; I do it all the time. Keep at it!

share|improve this answer
    
Thanks again Marc! –  dan Apr 17 '11 at 22:47
add comment

Try to export website as template and import wsp to Visual Studio. SharePoint will replace ListIDs with urls.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.