Is it possible to create a web part page with a dynamic data view source in SharePoint Designer 2007?

Hello.  I have a few lists that contain the same columns because they are associated with the same content type.  I have created a few lists instead of one due to permissions requirements.  I have created a custom Web Part Page with a data view on it as per project requirements.  I have noticed that the GUID for the underlying data source appears as the default value for the ListId property a few times in the page's code view.  Is there a way to pass the data source's GUID in as a parameter?  If it's possible, I'd like to have one Web Part Page where I pass the GUID in as a parameter and the Data View dynamically binds to the proper List instead of having to create a Web Part Page for each list.

Thanks.
BLEIPAsked:
Who is Participating?
 
sharepointguru14Connect With a Mentor Commented:
couldn't you put a list view of each list on the same page and then just audience target the webparts to the appropriate groups?
0
 
BLEIPAuthor Commented:
sharepointguru14:

Thanks for the reply.   The page displays two data form web parts linked to each other.  I have 8 functional work units so I have a parent and child list for each of the 8 units.  If I use audience targeting, I would have to place 16 data view web parts on the same page.  I'm not sure how that would affect performance.  It would still require a bit of redundancy, although it would save some time.  If I cannot figure out a way to dynamically pass the GUIDs of the 2 lists, I will use your approach.

Thank you
0
 
BLEIPAuthor Commented:
sharepointguru14:

I just realized that the audience approach won't work for me because there are a few managers in a "Final Approvers" group that will need access to the data for all 8 units so the "Final Approvers" group would be an audience for all 16 web parts which would all display instead of just 2 when someone from that group viewed the page.  Any way that you know of to pass querystring parameters to the page to display only the appropriate data form web parts?

Thanks
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
sharepointguru14Commented:
In the case of your final approvers group wouldn't you have the same problem even if you were passing the parameter?
0
 
BLEIPAuthor Commented:
No because the parameters I would be passing would be the GUIDs for the 2 appropriate lists.  Basically, what I have is 8 custom lists (1 for each functional work unit).  Each custom list uses a secondary list (as a 1 to many child list) for storing details.  On the EditItem.aspx page for each custom list, I have a button that will redirect to the page containing the Data Form Web parts.  In the redirect URL on each EditItem.aspx page, I'd like to pass the appropriate parameters so the page knows what lists to retrieve data from.
0
 
sharepointguru14Commented:
I haven't ever tried passing the listIDs as URL parameters. Only items within that list that the dataview was connected to. I'll have to do some digging. I'm fairly sure it can't be done with the OOTB dataviews but possibly could be done with some custom code. Would that be an option?
0
 
BLEIPAuthor Commented:
We currently do not have Visual Studio set up with SharePoint 2007 but it is on its way. I think you're right.  Now that I think about it, any parameter passed in would have to be read and code would have to be executed before the page was rendered.  I don't believe you can add any code with SharePoint Designer 2007.  I have been developing in .NET for the last 10+ years but haven't tried any .NET SharePoint development.  What I'd ultimately like to do is create a re-usable workflow with a custom collect-data-from-user screen that I could apply to several different lists (with the same columns) and have one dynamic page for displaying the parent and child list items for each list set.  If you wouldn't mind leading me in the right direction or posting a few helpful links on how to do that with Visual Studio.NET , I'd appreciate it.  

Thank you
0
 
BLEIPAuthor Commented:
In most cases, audience targeting would probably suffice.  However, in my case, some users will be in a group that needs to have access to all web parts, but not at the same time.  Input parameters would be the only way to resolve this issue and may require Visual Studio and custom code.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.