SharePoint randomly replacing file names in web parts? - sharepoint

Ok SharePoint is driving me crazy and I need to see if anyone has encountered a similar problem or knows of a solution:
I have a content editor webpart with some HTML including links to PDF files that I've modified slightly to append an employee number querystring ie:
<a href="http://moss.company.com/group/home/EPermits
/Blank%20Form%20Templates/_blank_breach_permit.pdf?empNum=">New Breach Permit</a>
And SharePoint seems to randomly replace the filename with aab04168 or some other similar characters:
<a href="http://moss.company.com/group/home/EPermits
/Blank%20Form%20Templates/aab04168?empNum=">New Breach Permit</a>
After this happened a few times with no explanation I tried changing the content editor webpart to look directly at a documentLinks.html file located in the Shared Documents folder of the SharePoint site and guess what... SharePoint edited that document and replaced my filenames with random characters in there too!
Figuring that filenames beginning with an underscore could be triggering some internal SharePoint procedures I've renamed all the files to remove the starting underscore--unfortunately the problem isn't immediately reproducible and I'm waiting right now to see if I run into any more trouble.
edit: the underscore in the filename didn't help... my documentLinks.html wound up getting modified and all the hrefs were replaced with random characters again. Now I'm setting the hrefs in javascript with the filename text concatenated together from multiple strings.
linkEle.href = ".../EPermits/Blank%20Form%20Templates/blank" + "_Chemical_Usage.pdf?empNum=" + empNumber;

Sharepoint uses the 'Title' field of the Document Library as the file's name. If the PDF file name is not stored in the Title field then Sharepoint might be creating a unique 'Title' for you. Check the column structure of your Document Library and ensure that you are storing the PDF filename in the 'Title' field.

Related

Does SharePoint 2013 file search favour Microsoft documents over PDFs?

I have a Content Source which crawls a network folder containing Word, PowerPoint and PDF documents. I have in addition a Result Source based directly on this content source and a Search Results web part which uses the Result Source as its query. If I search for “Digital Cameras” the first result is a PowerPoint document entitled “Digital Cameras: Thriving Amidst a Declining Market.” However, there is a PDF file also in the directory with the exact same title, but this file does not appear unless I filter by PDF Result Type, at which point it appears at the top of the list. In fact, with Result Type set to All, I cannot see the PDF version of the file even if I click through all the pages of the initial search.
I thought it might be considered a duplicate but I have “Show View Duplicates” checked and “Trim Duplicates” set to false. The pop-out next to the initial search item does not show a duplicate.
How do I get the PDF document to appear in the basic search next to the PowerPoint document with the same title?
In your search center (which may or may not be your main site or a specific subsite designated through Central Admin), go to site settings and then Search Result Types and there should be a list of the result types included in your default search.
Provided you are crawling the PDFs in your search crawl (Central Admin > go to your Search Service > Crawling > File Types) , and they have content that can be indexed (namely text in the documents and title and not just images inside the PDF), you should be seeing it then.
OK, I have added the question at the other place:
https://sharepoint.stackexchange.com/questions/137512/does-sharepoint-2013-file-search-favour-microsoft-documents-over-pdfs
Graham, thanks I checked the result types and the crawling types and all looks OK. Plus, if the item was not being crawled it would not show up in the search even with the filtering.

How do I search attached files stored in a MS Access 2010 database?

How do I search in MS Access (ver 2010) for data in files attached to records? If I do a "Find" and specify text I KNOW is in an attached txt file to a particular record, there are no hits. While if I have the same data in a Text Field or Memo field, Access finds it. I understood from one of the Access help screens I found that it is possible to search attachments from within Access, but I have not been able to do this yet.
BTW, I did try using the query tool and searching for text I knew was in the attachment, but it was not successful, although it did find the same text within a memo field in another record.
Thx,
jmb
I'm fairly certain that there is no mechanism in Access to find records based on text within a file attachment. A bit of web searching found an earlier question here and the responses seem to agree that there isn't.
One reference from Microsoft here says
By using attachments, you open documents and other non-image files in their parent programs, so from within Access, you can search and edit those files.
but I think that statement could be misinterpreted. I believe what they meant to say was that
"...from within Access you can open an attachment in its parent program and then work on it as usual (e.g., edit it, search it, print it, and so on)."
You can use file system object, open the file as string and search sequentially. That's as close as you'll get

How to get the filename for an attachment if there already is another one with the same filename, instead of getting a random name?

In cases when two attachments with the same filename are attached to a Notes Document, the second file is renamed internally to something like ATTXXXX. Even if the first filename is deleted and document re-saved, the internal filename remains cryptic.
There doesn't seem to be any way to retrieve the original Filename through back-end functions. I have looked high and low in LS but also in the C++ API, and could find nothing. It seems to be a trick that can only be done in the front-end. I am not sure where the information in the file icon graphic is stored, and whether it is accessible. In simple cases it would be possible to do a rename, I suppose (i.e. there is a single attachment and a single file icon graphic).
Could anybody confirm that this is, indeed a limitation of Notes or is there a cool way to solve this?
This is causing me some headaches whilst processing a large number of documents. My customer has trouble believing that there are some things that can only be done in the front end.
You should be able to get the original filename, even with duplicates.
It is not when the file is attached that the name is changed, it is when you detatch it.
You are probably using the .Name property, try the .Source property of the EmbeddedObject, that should return the original filename.
From the help:
If the NotesEmbeddedObject is an embedded object or object link, this property returns the internal name that Notes uses to refer to the source document.
If the NotesEmbeddedObject is a file attachment, this property returns the file name of the original file.
Syntax
To get: source$ = notesEmbeddedObject.Source
It's in the CD records for the rich text -- you will see it if you use NotesPeek to examine the contents of the rich text item. But I don't think it's accessible through the NotesRichText navigator class, so I'm pretty sure you would have to go the C API and parse through the CD records. Or, the MIDAS Rich Text API can probably get it, but that's third party software. I.e., not free.

How to retrieve the file path column "ows_EncodedAbsUrl" in search result.

I am passing the search query in to search.asmx to get the search value.
Through web services I am retrieving the search result. Search result will return document path for .txt files and image. This path used to open the file directly.
txt file: "http://server:24669/jap/ww.txt- It will open the file.
PDF File:"http://server:100/456efg/Forms/DispForm.aspx?ID=3&RootFolder=/456efg"- It will show PDF properties or parent folder.
So I need to Get the Url to open the PDF doc. "ows_EncodedAbsUrl" column have the document URL but it’s not retrievable in search result. Is there any way to solve the issue?
If you add a PDF iFilter to your SharePoint environment, PDF files will no longer be treated as list items (thus the property view link).
Of course Adobe post the instructions for this as a PDF.
This change will also start indexing the text of your PDF documents so they will be more searchable. Be aware that if a percentage of the PDF documents size will be added to your search storage costs, so plan ahead.
This is a cure for the symptom, I do not know if there are other ways to do this.

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

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

Resources