Solved

How do I send a field value of document library item to a survey list field?

Posted on 2011-02-25
3
309 Views
Last Modified: 2012-05-11
Hi - I'm hoping someone out there can help me with a problem I'm trying to solve in SharePoint 2010. I’ve tried a few solutions I’ve found online that are similar to my issue but nothing quite works the way I want it to. Here’s my issue:

I have a site based on the Enterprise Wiki template and within that site I have a document library called "Pages".

Within my Pages library I have several help articles. Each article is using a custom Page Layout.

When a user is on an article page I have provided a link for them to submit feedback on the article to a survey list called “Article Feedback” also within the same site. **The submit feedback link is coded in the page layout, not the article page content

The submit feedback link opens a dialog box for the survey list's NewForm.aspx page.

I would like to collect the value of a field called “ID” for the current article in the Pages Document Library then send it via a query string to the NewForm.aspx page.

Once the NewForm.aspx page loads in the dialog box the ID value sent in the query string should be automatically set in a single line text field on the form and also be set to read only so the user can't change it.

Is there a way to get the value of the ID field and put it in a query string so when the user click the "Send Feedback" link from the article page the value is passed to the NewForm.aspx page?

Once I am able to pass the value to the NewForm.aspx page how do I populate the text field on my survey list with this value?

I’m fairly new to this so hopefully I’ve given enough information for someone to help with this. Thanks to all that take the time to reply.
0
Comment
Question by:webgrl74
  • 2
3 Comments
 
LVL 6

Expert Comment

by:psv1973
Comment Utility
Maybe a silly question, but why don't you use a workflow here? with sharePoint Designer 2010 you can create a workflow which could do all the steps that you describe in your post.

Simply create a new feedback workflow. During this process you can then update the original document when you need to.
0
 

Accepted Solution

by:
webgrl74 earned 0 total points
Comment Utility
Thanks psv1973 for your response. I did consider using a workflow but my users only have read permissions on the list and they would need edit for that to work so it wasn't an option for me.

I ended up just capturing the url of the article page the user was on before clicking the feedback link and passing it in a query string. Once on the feedback form I used the "getTagFromIdentifierAndTitle" (javascript found on various sites across the Net) to assign the query string value to a text field on my feedback form.

Not as unique as the Document ID but the probability that the urls for my article pages will change after feedback is submitted is very rare so in this case it was an acceptable solution for me.

Thanks again for your help
0
 

Author Closing Comment

by:webgrl74
Comment Utility
No acceptable solutions were provided before I managed to solve the issue myself.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

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 …
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

7 Experts available now in Live!

Get 1:1 Help Now