How to let the users upload a document and set a field to a specific value?

Posted on 2014-09-23
Last Modified: 2014-09-24
I'm working on an event management site. I'd like to have a button on each event that opens a window to a list of documents that are related to that event. In order to do that, I'd like to have a button where the users can upload documents and where the EventID field is set to the ID of the current event. I planned to do this with JavaScript. The problem is that first the users have to go through the Upload document page and then enter the values on a new page. I don't know how to get the ID value from the event page to the page where the EventID is  entered. I can't use C# code for this project.
Question by:kasperEH
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
  • 4
  • 4
LVL 19

Accepted Solution

Montoya earned 500 total points
ID: 40339213
Have you considered using document sets?

With document sets, in case you don't know, you can provide templates for, let's say 5 different required documents:



Each record will require these documents, and each document is assigned to that record.  (just a thought)

Author Comment

ID: 40339312
It might be a solution, but how can I make sure that the document set gets a name equal to the ID of the event? Otherwise, I can't create a button to link to this document set. I could pass the value via the URL with JavaScript, but I can't seem to grab the URL, it's only in the ribbon and you can't right-click to Open Link in New Tab.
LVL 19

Expert Comment

ID: 40339470
In any scenario, you can add metadata to the documents through workflows, though I have not tested that specific scenario from an attached document set.

The thing is that, with the document set, all those docs are part of the record. Are you saying you need to 'tag' the documents anyway?

That I'd have to test.
Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.


Author Comment

ID: 40340939
The requirement is to have a button from the page with the details of the event to view a list of documents related to the event, say an agenda, a white paper and directions (3 documents in this example). So I want to create an automatic link between the two. If I ask the users to manually create a document set then I don't know what it will be called and can't create a button to link to it.
LVL 19

Expert Comment

ID: 40341463
That's not quite how document set works. You create a new record, the new record requires your document set. All documents are related by the new record you created. Does that make sense?
LVL 19

Expert Comment

ID: 40341467
look here:

As you can see, the documents that are created as part of the document set can all have shared metada, so they will all be related, and they are further related because they are all part of the same record. So if you click on one record, the attached documents will always be there.

Author Closing Comment

ID: 40341633
Thank you very much for your solution that could work fine in a different scenario. I have however chosen a solution where  a folder is created automatically with JavaScript:

Then I can link to that folder from the event item.

Author Comment

ID: 40341639
It works fine in SharePoint 2010 too

Featured Post

Office 365 Training for Admins

Learn how to provision tenants, synchronize on-premise Active Directory, and implement Single Sign-On with these master level course.  Only from Platform Scholar

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JS to redirect to prev page 8 40
HTML editor custom button 3 82
Slush on text 2 22
Error Handler 8 38
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

740 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