?
Solved

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

Posted on 2011-02-25
3
Medium Priority
?
327 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
ID: 34996384
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
ID: 35165626
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
ID: 35196648
No acceptable solutions were provided before I managed to solve the issue myself.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 9 hours left to enroll

862 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