Solved

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

Posted on 2014-09-23
8
179 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
[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
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…

687 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