Solved

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

Posted on 2011-02-25
3
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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.

Question has a verified solution.

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

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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