Solved

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

Posted on 2013-01-08
8
376 Views
Last Modified: 2013-01-25
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.
0
Comment
Question by:BLEIP
  • 5
  • 3
8 Comments
 
LVL 15

Accepted Solution

by:
sharepointguru14 earned 500 total points
ID: 38757705
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
 

Author Comment

by:BLEIP
ID: 38759435
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
 

Author Comment

by:BLEIP
ID: 38760789
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
 
LVL 15

Expert Comment

by:sharepointguru14
ID: 38761464
In the case of your final approvers group wouldn't you have the same problem even if you were passing the parameter?
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

Author Comment

by:BLEIP
ID: 38774564
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
 
LVL 15

Expert Comment

by:sharepointguru14
ID: 38776613
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
 

Author Comment

by:BLEIP
ID: 38778568
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
 

Author Closing Comment

by:BLEIP
ID: 38818951
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

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

I have just recently built a new SharePoint 2007 farm on a complete Windows 2008 R2 server platform and part of my standard build procedure is to implement a warm up routine, usually in the form of a script that is scheduled every morning to launch …
The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now