Solved

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

Posted on 2014-09-23
8
172 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:
Iammontoya 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:Iammontoya
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
 

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 19

Expert Comment

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
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…

708 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

15 Experts available now in Live!

Get 1:1 Help Now