Solved

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

Posted on 2014-09-23
8
175 Views
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.
0
Comment
Question by:kasperEH
  • 4
  • 4
8 Comments
 
LVL 19

Accepted Solution

by:
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:

checklist.doc
seatingchart.xls
contactlist.doc

etc..

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

Author Comment

by:kasperEH
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.
0
 
LVL 19

Expert Comment

by:Montoya
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.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:kasperEH
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.
0
 
LVL 19

Expert Comment

by:Montoya
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?
0
 
LVL 19

Expert Comment

by:Montoya
ID: 40341467
look here: http://office.microsoft.com/en-us/sharepoint-server-help/introduction-to-document-sets-HA101782466.aspx

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.
0
 

Author Closing Comment

by:kasperEH
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:
http://www.c-sharpcorner.com/UploadFile/0e18a8/create-a-folder-in-document-library-in-sharepoint-2013-using/

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

Author Comment

by:kasperEH
ID: 40341639
It works fine in SharePoint 2010 too
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTTPS jquery doesn't work 9 63
jQuery delay animation 3 30
SharePoint Explorer Folder Access 4 37
How to submit record from external php form to a Sharepoint list? 5 35
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…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

803 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