SharePoint 2007: How to upload multiple files to a List Item? - sharepoint

I know that a Document Library in SharePoint 2007 has a multi-file uploader (an ActiveX control that -- and only if you have Office 2003+ installed) but how would I use this same feature with a normal (non-document-library) List item?
Uploading files to a normal List item involves clicking the "upload" link and browsing/uploading files one by one. Is there a better way than this? Surely there must be.
Jake

There is an approach I use, but there is no UI support for it. You may find it a bit tedious for onsey-twosey uploads, but it saved me hours once for serious bulk uploads.
The same WebDAV functionality that we get when using "Open with Windows Explorer" on a document library is available for a list.
Say I have a list at http://myorg.com/sites/Widgets/Lists/MyList.
I can open the list in Windows Explorer by going to the address \\myorg.com\sites\Widgets\Lists\MyList.
Attachments are stored in the sub-folder Attachments, which contains folders with numeric names (1, 2, 3, ... and so on). The numbers correspond to the item ID of the list item. Pick (or create) a folder with the ID corresponding to the item you want to upload to, and it's drag-and-drop from there.

Short of writing your own mulit-file upload web part I think you are going to be stuck with either one at a time (i.e. an attachment to the list item) or switch to a document library. Don't forget that you can customise your library to behave much like a list.
Why is it a problem to use a document library?

I seem to be making a habit of answering my own questions. Not sure if that's a good thing or not.
What I ended up doing was adding an "Upload Multiple Files" button to the toolbar which pointed to a custom ASPX page in the _layouts folder. This page displayed the ActiveX component used by a Document Library and the "post to" URL for it was the ASPX page itself. When posted to it looked for files uploaded and attached them all to the List Item referenced via URL parameters passed to it from the toolbar button.
It's discussed here:
http://weblogs.asp.net/nathanyorke/archive/2007/12/05/uploading-multiple-files-via-the-web.aspx
If I get round to blogging and fuller explanation on my own site I'll try and remember to post a link back here.
Jake

Related

Change SharePoint Library URL

How do you change the URI of a SharePoint library? Based on Google searching, most people say that changing the name of a library in Designer (via right click->rename) will result in the URI change, but it is only changing the name for me.
I am using SharePoint 2010 Foundation and these are the steps I am following:
In Designer, navigate to List and Libraries
Right click library -> rename
Notice that name changes
Notice that URI does not change
This is one of the resources I found claiming that this works:
change URL spelling/case on sharepoint library
In SharePoint Designer just navigate to All Files navigation node (not List and Libraries node), find your document library there -> right-click library -> rename.
The URI would change then.
Edit:
At least at SharePoint 2010 it is possible to change library URL, without using SharePoint Designer.
Just go to a library trough 'All Site Content'. When inside the library choose on the ribbon 'Library' tab. Then select 'Open with Explorer'. That will open your SharePoint's library in Windows Explorer window. Navigate one folder up and you will see list of your libraries as folders. Rename required library's folder name as you want the URL to look like.
SOLUTION:
Thank you! I found the suggested SharePoint Designer solution above to work beautifully!
Here are the steps that I took:
Follow the instructions above by opening the List in SharePoint Designer, selecting All Files under the navigation node (near the bottom)
A bunch of folders appeared - I selected the folder named 'Lists'.
From here, it will show the list names and the display names. Change the actual name of the list (first column) by right-clicking on it, rename. This will update the url. You may wish to match this to your display name.
When you return to your site, the navigation link for the list may still go to the old URL. To update this, enter in the new url in your browser, go to List Settings > Title, Description and Navigation. Simply hit the save button without making any changes. The navigation link is now updated.
Please note: If you are updating list urls and names of a project site (from Project Server), do not rename the Risks, Issues lists. These must remain for Project Server to function properly.
Thanks for this solution. I only have Designer permissions but was still able to change a List URL within the browser (not Sharepoint Designer, and must be IE to have Open in Explorer enabled). Steps:
Go to Site Contents and open a Document Library in the site
Click on Library ribbon tab and select Open In Explorer option
Click up one level in the directory structure - there should be a
Dir called 'Lists' - open
Your List should be there to right click and rename.
I was surprised that the system let me do this (it didn't let me delete a document in the same DL that I need to get rid of), but after testing for some time the URL change seems to have held.
Finally - you might have to re-Resolve some views and overlays, as these might not automatically cascade with the new List location.
Cheers,
Ross
I have changed the library URL from SharePoint Designer 2010, in the "Site Object" section --> "All files" option. Then I selected the right library in left pane and press F2 (to change name, like in windows) and worked for me. I hope that helps someone.
You cannot change Document Library URL , only name.
If you want to have a new URL :
Create a new document library with good URL
Batch import all docs from old to new document library
warning :
all new imported doc will be flagged with username used in the import process
all datetime fields will be reinitialized
I don't have Sharepoint Developper installed and can't install it.
I needed to change the address of a List and not a library, so the "Open in Explorer" doesn't work for me (only get "Open in Access" and "Open in Project").
I managed to do it by opening Explorer by myself and paste the URL "http://MyServer/MySite/" (can be also "http://MyServer/MySite/MyPage/").
I got the "All Files" you get through Sharepoint Designer.
In my case I had to go to "Lists" and change the name of the folder for the list I wanted to change the name.
Next I had to change the name of the list from the "List properties" (to change back the visible name of the list)
I am only a Site Collection Administrator for a SharePoint online platform. The powershell and sharepoint designer usage are not within my access so the only option I have is the "Open in Explorer". I tried the steps seen online but didn't get the result. When I saw ragmaxone's step, I got an idea. Then I took the following steps:
I copied my url without the document library eg "http://MyServer/MySite/MyDocLib/ is the URL of the document library but I copied "http://MyServer/MySite/ instead.
Next I opened the document library in classic SPOnline because I use modern SPonline.
Then I replaced the pathway address with the copied URL and saw all my document libraries as folders.
With right clicking on the document library of interest, and renaming like is done in windows, I went back to my document library and saw page not found.(Don't worry! Something had changed already).
Then I went to the homepage of the platformand navigated to the document library in question to see that it has been renamed and the URL also corresponds to the new name.
Thanks for all your answers and help.
In Designer go to "All Files" -> then search for "List" folder ther you can find your List right click it rename it and boom.
By going to Lists and Libraries tab from left menu will only change the title of list. So go to All files and follow the steps.

Download a document from SharePoint with version number

I need to be able to download a file out of SharePoint (to send externally) that has the version number in the file name.
Is there any way to do this without custom code? If not, how would I code this?
File in SharePoint -> Specifications.doc
Downloaded file -> Specifications V99.doc
I use SharePoint 2007, but I am also interested in a 2010 solution.
Don't think it's possible out of the box. As for manual implementation I see two ways:
1) If you can use some external application (or, for example, webpart or page) to do that, just get sharepoint file as binary stream and save it with the name you want.
2) If you need it to look like standard downloading, add a new custom button to document context menu (Ribbon in SP2010) and again do whatever you want with that document when user clicks the button.
This is about as close as I think we can come at this time:
http://spversionindocs.codeplex.com/
It allows you to have a version number field in your document that is automatically updated with the version number from sharepoint.

copy webpart page (aspx page) with web parts

I have a web part page "DocLib1.aspx" in document library "DobLib1" and it has few webparts.
How can I take the same web part page and copy it to other document libraries (there are about 50+ document libraries). The web part page is named after the document library (with aspx extension). One of the web part is the list for the same doc lib where the web part is residing.
This worked for me for SharePoint 2010:
Open the site in SharePoint Designer 2010
Right click the page and select copy.
Select a different folder
Rename the page
Move it back to the original folder.
All the WebParts will be intact.
This might seem elementary, but within SharePoint copying a page doesn't copy any of the WebPart on the page. That drove me bonkers. Hope this helps you.
There are two options to copy and paste a Sharepoint 2010 page and retain its web parts:
Perform the copy and paste through Sharepoint Designer 2010.
Access any page in Sharepoint Browser and go to Site Actions > Manage Content and Structure. Copy and paste is possible from here but copy and paste within the same directory can fail; paste in a different directory level then rename the file.
I came upon this site when also looking for a solution to copying a webpart page, but I actually found an even easier way. I've got a library that holds webpart pages, and whenever I need another page that is similar to one of the others in the library, I go to Library Tools > Library in the ribbon, and then Open with Explorer. From there, I simply Copy/Paste the webpart page that is similar to what I want into the same library and then rename the page. Then I can open the new page and make the needed changes.
To add my experience to qhawk's solution (I cant just add a comment directly under the solution as I have less than 50 rep) - in SharePoint Designer 2010, I had to go to Site Objects --> All Files --> then select the relevant Library which has the page you want to copy, copy it to another Library, e.g. Shared Documents, rename it there, copy it back, job done.
I found that if I just selected Site Objects --> Lists and Libraries --> and chose my Library from there, it wouldnt list the actual items in the library to be able to copy them, not even in the Views or Forms box. You have to go through the 'All Files' route.
PS. I know this is an old thread, but I found this whilst trying to find the solution for this, and after finding qhawk's solution needed a little tweaking for me, thought I'd let others know incase someone else stumbles across this.

SharePoint Designer 2007 - link to a Document Library on a site from another site?

I am trying to create a link to an existing Shared Documents folder on another site. Both sites are on the same server.
Here are the steps I take to create a link to an existing Document Library:
I create a document library web page in Share Point 2007.
I open the document library (AllItems.ASPX) in Share Point Designer.
I delete the existing web part for the list.
In the Data Source Library, I click on "connect to another library" and create a connection to the other site.
I select the document library, click show data, select my rows and click Insert Multiple Item View.
I then configure the look for each field (hyperlinks, etc).
I edit the Filter for this view to show only the files that are for this location.
I click on Data View Properties and select "Enable sorting and filtering on columns (basic table layout only).
Basically I am trying to have a central location for all files for a site and sub sites. I want the sub sites to see the documents for their own location, be able to search through the files, etc.
The problems I am having are:
I am unable to open the links in a new window, even when I set the hyperlink to do so. I would prefer the file be opened in its native application (ie. A Word doc open in Word).
I am unable to show the file icon in the same way it shows up in the original document library.
When I go to the header and click ANY field, I can sort the field ascending or descending but I always get a message stating "This column type cannot be filtered".
Is there an easier way to do this? Or can someone tell me what I am doing wrong? I am new to using Share Point. Thanks for the help!
Some help for problem 1 (unable to open the links in a new window)...
I'm not sure if this will work using the Data View Web Part you have configured. However there is a technique for the List View Web Part. If you add a boolean field called OpenInNewWindow to your document library then documents that have this set to Yes will open in a new window. Try this out - it may work.
If you need to open PDF files in a new window, beware that there is an ActiveX control that will get in the way. Read this question for more information.

Custom SharePoint List View - can I put it in a feature (WSP)?

Here's my situation:
I'm working in SharePoint 2007 Enterprise, I have a feature that creates a list for me when I deploy and activate it. My usual workflow thus far has been to deploy the solution, activate it, then open up SharePoint Designer to customize the list.
My customizations are typically pretty complex, but I'll keep things simple. In this case, let's just say that I edit AllItems.aspx, convert the data view to an XSLT data view, then I add one column with static text.
I've used a few different tools (SPSource, VSeWSS, SharePoint Manager, OCDExportList, etc) to extract my custom schema.xml and all the default views, but I have yet to have any luck figuring out where the the code for AllItems.aspx is now that it's been customized.
When I extract (using any of the tools above) AllItems.aspx is no different than the default. The <View> element in schema.xml is reduced to one line, for example:
<View DefaultView="TRUE"
MobileView="TRUE"
MobileDefaultView="TRUE"
Type="HTML"
FPModified="TRUE"
DisplayName="All Documents"
Url="Forms/AllItems.aspx"
Level="1"
ContentTypeID="0x" />
I'm really stuck here... I've got no clue what to do. Is it even possible? It would save me a great amount of time (and documentation) if I could include my customizations in my feature.
If there's any other info I'm missing that would help, let me know... thanks!
Latest findings:
I've found out a bit more in the past couple hours. If I save the list as a List Template, then save the .stp file locally as a .cab file I can extract its contents. One of the files is manifest.xml which contains the schema.xml as well as a few other sections.
One of those sections is a <webparts> section that has a <webpart> for each view. Each of those <webpart> elements contains a really long string of characters... no clue what those characters actually represent.
The important thing is that I think any custom views have to actually be Web Parts if deployed as part of a solution... but I'm not positive.
I have faced a similar issue a while ago. I had to create a very customized view and I had to give up the ListFormWebPart completely, and have created my own webpart to render the data.
Generally, when you customize the aspx file in SPDesigner, all your changes will be in the aspx file itself. Open it in SPDesigner and you will see there all the changes you have made. After you have converted to the XSL Data View, the standard ListFormWebPart is replaced by a DataFormWebPart, which doesn't care about the <View> tags specified in the schema.xml; Look in the aspx file itself for the ListFormWebPart.
Why not do all the customizations you want on a list, save the list as a template (it will include the associated AllItems.aspx) and then use that template in your feature to create your list? You could add the extracolumn from code (if it's dynamic and cannot be included in the template), and so on.
Yes you can. Get the Sharepoint manager tool from Codeplex
http://spm.codeplex.com/
Install it on a machine in your farm, it will allow you to browse the farm via a tree view that shows all objects.
Make the list via the Sharepoint GUI, then browse to it w/ SPM.
SPM will allow you to extract the MOSS/WSS created xml that describes the list view (it shows up in the left hand property grid), which you can then plop into your manifest.xml
I have a similar issue and have been doing a lot of research into this. The dataview web part to me is one of the most powerful components in Sharepoint. Unfortunately I have to provide my solution as a .wsp package and that means that I can not just make the site and use Designer on that site. I have taken a 2 step approach in that I used designer to create my dataview and I also edited the code of that dataview to replace the ListID and Guids to ListName and the actual list name. This allows it to be exported and used in any page/site as long as the list name is the same. I am creating a webpart page document library also in my solution and I believe I can add the pages that have the webparts to this library using the onet.xml file. I will try to get the results of that test in as soon as I can do it.

Resources