Populate sharepoint2013 document library coloumns using infopath2013 form
Hi
Is it possible to populate sharepoint2013 document library columns using Infopath2013 forms?
A form created in info path is published to the document library.
As default when you create a new form from the library - fill it and then you can save the form and are presented with pop-up-box where you type inn the filename. This data (Filename) is stored under the library column "Name" for the form-file.
However it would be terrific if the user also had to input data in the other columns . These columns are required* in the library.
Im a total newb at infopath, any help would be much appreciated!
And showing how would be very nice too!
brgs
bjorn
By mapping fields on the infopath form to the sharepoint list/library (column type basic text), I could populate the metadata columns as i wanted.
Similar Messages
-
Open PDF's in new window in document library when using "Find a file" search
I need to be able to open PDF's in a new window from a document library when using the "Find a file" search built into the document library "All documents" view. I currently have the following javascript on the page:
_spBodyOnLoadFunctionNames.push("setTargetBlank()");
function setTargetBlank()
{ $("a[href$='.pdf']").removeAttr('onclick').attr("target", "_blank");
This works great when going to the document library and navigating through the folders then clicking on a link.
The problem is when someone goes to the document library then uses the "Find a file" search and then they click on a link. The "Find a file" search does not do a postback (reload) of the page, therefore my javascript to find the PDF links
and make them open in a new window does not run for the links on the page.
I have read the following article but this does not seem to offer a solution that will work in this situation for SharePoint 2013 (Office 365): http://social.technet.microsoft.com/Forums/sharepoint/en-US/7ad3224c-3165-47ae-95bc-4f3928e2f9a8/opening-document-library-pdf-in-a-new-window-sharepoint-2013?forum=sharepointgeneral
I suppose the idea solution would be to somehow tap into the event that is fired when using "Find a file" search to run my javascript and update the links for the search results.
Can anyone offer any solutions to this issue?Hi,
According to your description, my understanding is that you want to open PDF files in a new window from a document library when using the "Find a file" search.
As you said, the "Find a file" search does not do a postback (reload) of the page, therefore JavaScript to find the PDF links and make them open in a new window does not run for the links on the page.
I recommend to use JS link to achieve the goal. Create a JavaScript override file and upload the JavaScript file to the Master Page Gallery, and then set the JS Link property of the document library web part to point to the JavaScript file.
Here are some links about the JS link in SharePoint 2013 for you to take a look:
http://www.idubbs.com/blog/2012/js-link-for-sharepoint-2013-web-partsa-quick-functional-primer/
http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial/
http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support -
Setting default value of document library column using powershell
Created document library based on template which is using custom content type containing managed metadata based column.
I can upload documents. Everything looks normal except when I visit Column default value settings page in DL settings, I get error message below
Application error when access /_layouts/15/ColumnDefaults.aspx, Error=Value does not fall within the expected range. at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
at Microsoft.Office.Server.WebControls.MetaDataNavTree.TreeViewDataBound(Object sender, EventArgs e) at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationContext.OnTreeViewLoad(SPTreeView
spTreeView) at Microsoft.Office.Server.WebControls.MetaDataNavTree.PerLocationPageLoad() at Microsoft.Office.DocumentManagement.Pages.ColumnDefaultsPage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRe... 6bf73b9c-e4f3-10ae-0f74-9672cdd9936f
I tried many things but nothing seems to work. When I create document library using SharePoint OOB template, everything works.
Any help would be appreciated.
Thanks.I found another way to fix this. Thanks to you pointing me to the file "{List Name}/Forms/client_LocationBasedDefaults.html"
I found the difference between this file and the one of a list that worked:
I had "&" in the names of some folders. The recreated subsites from a template that contained such folders in the document library had the problem descriped by the OP. In the recreated client_LocationBasedDefaults.html there were actual '&'
in the folder names instead of '%26' escape characters. After replacing those characters with their escaped version everything worked as expected again. -
No email attachments to Document library when using data driven subscriptions
We have recently migrated to SharePoint 2013 and setup document libraries to publish reports to.
When we send an email with an attachment to the document library from a users mailbox, the document library acts as expected and detaches the email and publishes it to a subfolder inside the library. However when we schedule reports using data driven subscriptions
and add the email address as a CC, the subfolder gets created but there is no attachment.
What could cause this issue?
Thanks for your timeHi WFN_Will,
regarding this issue, we don't know for sure, unless we trace the process,
do the attachment is not there, or when the attachment there the process was failed, or the target not able to receive the attachment?
from the description, seems the target and the process of receiving the attachment is ok, I guess you can start to check from this part:
https://sharepointstuff.codeplex.com/workitem/2894
http://msdn.microsoft.com/en-us/library/ms154050.aspx
http://technet.microsoft.com/en-us/library/ms159150.aspx
http://technet.microsoft.com/en-us/library/cc262947.aspx
http://manomangaldas.blogspot.in/2008/04/send-email-with-attachments-in.html
to ensure that the attachment is there.
Regards,
Aries
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Unable to mail-enable a document library when using Directory Management Service in SharePoint 2013
I'm not able to mail-enable a library document while Directory Management Service is enabled. This behavior only happens when Directory Management Service is turned on.
Correlation ID: a8c7b29c-d193-90b5-ae14-64cd1143445f
Note that I have the OU created and permissions setup properly according to MS official documentation.Hi,
According to your post, my understanding is that you failed to mail-enable a library document while Directory Management Service is enabled.
Please make sure you configure the incoming email correctly.
For more information, you can refer to:
https://hosting.intermedia.net/support/kb/default.asp?id=2439
http://davecoleman146.com/2010/10/20/how-to-setup-mail-enabled-document-libraries-in-sharepoint-2010-part-1/
If so and the error message persists, please check the SharePoint ULS log to find more information about this error, the ULS log file is in the location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
You can check the ULS log by the methods here:
http://blog.credera.com/technology-insights/microsoft-solutions/troubleshooting-sharepoint-errors/
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Document library sync using "Connect to Outlook"
Hi,
I have a requirement where users want to have "bi-directional
synchronization" using "Connect to Outlook" functionality for Document libraries in SP2013
server . While clicking the on "Connect to Outlook"
button they can see the documents in Outlook but they need to want to have some documents and emails on their local machine and drag drop on Outlook 2010. It showed a circular cross and users could not sync their files from Outlook 2010 to SharePoint 2013.
Q: Does Microsoft provides only one way sync for
document libraries? I think OneDrive could help them. But OneDrive does not sync to Outlook.
Q: Do we have any connectors to OneDrive to
Outlook clients (Outlook 2010 specifically).
Any pointers would be appreciated.
Regards,
Aroh
Aroh ShuklaIf you specifically need this functionality in Outlook, take a look at Harmon.IE which is an Outlook plugin for SharePoint.
www.harmon.ie
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times. -
Hi,
We have a SharePoint 2013 doc library based on a custom template, which has been migrated from 2010.
We are unable to see existing documents in a Document library created using this template while saving a document directly in it using explorer mode, However we can save files and even see them in explorer mode, only when we try to save a new document there
directly, we cant see the old docs.
All the OOB libraries work fine.
Below is the normal behavior while saving a file, however nothing comes up when saving on this custom template librarySolved it myself guys... (Well the major part)
Got help from here...
https://www.nothingbutsharepoint.com/sites/devwiki/articles/pages/blank-open-save-dialog-when-browsing-document-library-from-office-clients.aspx
and
http://www.sharepointconfig.com/2011/02/vs2010-list-definition-template-missing-file-dialog-view/
with some tweaks of my own..
Still working on it because its showing SharePoint 2010 header... And I need 2013 look... -
Javascript to upload a file to SharePoint 2010 document library
Please share your ideas. I am using SharePoint 2010. Currently when uploading files to a document library, first the upload form is opening to upload the document and then the edit form. I would like to have both this in the same form. I am trying to
create a webpart page with the controls to upload the file to document library and assign values to the fields in the library. I am looking for some javascript for doing this. Is there any other way of achieving this? Please share any sample
code.
<label for="title">Enter the title for this document:</label> <input type="text" id="title"><br/><br/>
<input id="inputFile" type="file"/><br/><br/>
<input id="uploadDocumentButton" onclick="UploadDocument()" type="button" value="Upload Document"/><script type="text/javascript">
function UploadDocument() {
//javascript to upload the file to MyLibrary and update the title field
</script>Use the below code step by step :)
(1) Html
<input type="file" id="attafh" class="AlltextAccount" />
<input type="button" value="upload" onclick="rundCode()" />
(2) JS File
function rundCode() {
var file = document.getElementById('attafh').files[0];
if (file) {
UploadMe(file);
(3)
function UploadMe(readFile) {
var reader = new FileReader();
reader.readAsArrayBuffer(readFile); //array buffer
reader.onprogress = updateProgress;
reader.onload = loaded;
reader.onerror = errorHandler;
(4)
function loaded(evt) {
var fileString = evt.target.result;
var X = _arrayBufferToBase64(fileString); // this is the mothod to convert Buffer array to Binary
var fileInput = document.getElementById('attafh');
var fileDisplayArea = document.getElementById('fileDisplayArea');
var file = fileInput.values;
var filePath = $('#attafh').val(); // "c:\\test.pdf";
var file = filePath.match(/\\([^\\]+)$/)[1];
var soapEnv =
"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> \
<soap:Body>\
<CopyIntoItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>\
<SourceUrl>" + filePath + "</SourceUrl>\
<DestinationUrls>\
<string>http://intranet/sites/English/DocumentLibrary/" + file + "</string>\
</DestinationUrls>\
<Fields>\
<FieldInformation Type='Text' DisplayName='Title' InternalName='Title' Value='Test' />\
<FieldInformation Type='Text' DisplayName='BudgetId' InternalName='BudgetId' Value='8' />\
</Fields>\
<Stream>" + X + "</Stream>\
</CopyIntoItems>\
</soap:Body>\
</soap:Envelope>";
$.ajax({
url: "http://intranet/_vti_bin/copy.asmx",
beforeSend: function (xhr) { xhr.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems"); },
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResult,
contentType: "text/xml; charset=\"utf-8\""
SP.SOD.executeOrDelayUntilScriptLoaded(initialize, 'SP.js');
SP.SOD.executeOrDelayUntilScriptLoaded(test, 'SP.js');
function errorHandler(evt) {
if (evt.target.error.name == "NotReadableError") {
// The file could not be read.
function _arrayBufferToBase64(buffer) {
var binary = ''
var bytes = new Uint8Array(buffer)
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode(bytes[i])
return window.btoa(binary);
(5)
function updateProgress(evt) {
http://www.abdulazizfarooqi.wordpress.com Abdul Aziz Farooqi [BizTalk & SharePoint Consultant] MCPD Web & MCPD SharePoint 2010 -
Error while programmatically adding a document to SharePoint document library
Hello everyone,
I have created a custom content type and modified the document template to use the quick parts inside the template.
I have a document library which uses the custom content type.
I have a button inside a custom application page(created using visual studio). On click of this button I want to create a new document inside the document library using the custom content type and update other columns in the content type. I am able to create
the document, but I get the below error when I open the document.
public static void UpdateAndCreateFile(SPWeb web)
try
web.AllowUnsafeUpdates = true;
string sList = "My Document Library";
string sContentType = "My Custom Document";
SPList list = web.Lists[sList];
// this always uses root folder
SPFolder folder = web.Folders[sList];
SPFileCollection fcol = folder.Files;
// find the template url and open
string sTemplate =
list.ContentTypes[sContentType].DocumentTemplateUrl;
SPFile spf = web.GetFile(sTemplate);
byte[] binFile = spf.OpenBinary();
// Url for file to be created
string destFile = fcol.Folder.Url + "/" + "test2.docx";
// create the document and get SPFile/SPItem for
// new document
SPFile addedFile = fcol.Add(destFile, binFile, true);
SPItem newItem = addedFile.Item;
newItem["ContentType"] = sContentType;
newItem.Update();
addedFile.Update();
web.AllowUnsafeUpdates = false;
catch (Exception ex)
// handle exception here
The above code gives the same issue when I use the 'Document' content type instead of the "My Custom Document" content type.
The document looks/opens fine when I create it from the browser.
Please let me know if you have any suggestions. Thanks.I could not figure out a proper solution, but here is what I did to get around the issue.
I created a document using the document template and saved it to the library(same doc library) and named it as Sample.docx
In my code, every time I had to create a document, I would just copy the Sample.docx file to the library, but make sure I rename the file when I copy it.
Then I can use the url of the file I saved through my code and get the list item and update the other properties/columns of the content type
Below is the code to use an existing file and create a new file
public static void UpdateAndCreateFile(SPWeb web)
try
web.AllowUnsafeUpdates = true;
string sList = "My Documents";
SPList list = web.Lists[sList];
// this always uses root folder
SPFolder folder = web.Folders[sList];
SPFileCollection fcol = folder.Files;
SPFile file = fcol[sList + "/Sample.docx"] ;
file.CopyTo(sList + "/" + "test1.docx", true);
web.AllowUnsafeUpdates = false;
catch (Exception ex)
Thanks. -
Different View for same document library on a Wiki Page
Hi,
I am developing a Provided hosted app which have a functionality to create a document library with two Views. Also we need to show this document library in a wiki page with two different views.
I am using CSOM (C#). I am able to create the document library and the two views programmatically. But when I add the document library in the wiki page the default view (All Documents) is shown for both the web parts. There is an hidden view created with
the WebPartDefinition from the xml provided through code.
Through CSOM we are able make a View as default with the link below.
http://sharepoint.stackexchange.com/questions/90433/add-document-library-xsltlistviewwebpart-using-csom-or-web-services
In my case both the webparts will get the same view, where I need different view for same document library in a wiki page.
Also I tried to update the web parts with the following code.
string viewString = @"<View Name='{0}' MobileView='TRUE' Type='HTML' Url='/SitePages/Home.aspx' Level='1' BaseViewID='1' ContentTypeID='0x' ImageUrl='/_layouts/15/images/dlicon.png?rev=23' >
<Query><Where><Eq><FieldRef Name='KeyDocument'/><Value Type='Boolean'>1</Value></Eq></Where></Query>
<ViewFields><FieldRef Name='FileLeafRef'/><FieldRef Name='DocumentOwner'/><FieldRef Name='Modified'/>
<FieldRef Name='_UIVersionString'/><FieldRef Name='Editor'/></ViewFields>
<RowLimit Paged='TRUE'>30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default='TRUE'>main.xsl</XslLink>
<Toolbar Type='Standard'/></View>";
WebPartDefinition wpd = wpfound.FirstOrDefault();
string formattedstring = String.Format(viewString, wpd.Id);
wpd.WebPart.Properties["XmlDefinition"] = formattedstring;
wpd.SaveWebPartChanges();
web.Context.ExecuteQuery();
I created two views (viewString) as shown above.
The above code did not throw error, but it did not update the web part.
Please advise how to move forward.Hi Samir,
When we click outside of the list view webpart on a webpart page (or allitems.aspx page) with containing multiple webparts, the list view webpart will lose the focus, and the selected items will be deselected, this is by design.
You can look at the following article with using the approach/workaround of Javascript to prevent the specified list view webpart from losing focus.
http://sharepoint.stackexchange.com/questions/44360/list-view-loses-focus-when-additional-webpart-added-to-page
//Set focus on our list web part
var webPart = document.getElementById('WebPartWPQ1');
WpClick({target: webPart});
//Prevent it from losing focus
SP.Ribbon.WebPartComponent.$3_1.deselectWebPartAndZone = function() { };
Thanks
Daniel Yang
TechNet Community Support -
Hi,
I have to develop multiple sequential workflows. Depending on the user input at the time of workflow start, I have to decide which workflow will kick start. I am using visual studio to develop my sequential workflow. Is it possible to achieve this?
So, at the time document added to the document library, depending on the library column values Workflow1, worflow2 or workflow3 will start.
ThanksHi,
According to your post, my understanding is that you want to start workflow based on the library field value.
We can use the ItemAdded event receiver to achieve this scenario.
When the document added to the document library, then use the properties.ListItem[“FieldName”] to check which value filled.
Then based on different field value to start different workflow.
More reference:
http://jainnitin2411.wordpress.com/2012/07/06/programmaticallystartsharepointworkflow/
http://chakkaradeep.com/index.php/sharepoint-2010starting-site-workflows-programmatically/
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Enable Merge Documents and Relink documents views for a document library
Hi All,
I would like to have Merge Documents and Relink documents views for a document library (not a form library). I was able to see Combine.aspx and Repair.aspx in the document library open with explorer -> Forms folder. How do I enable these two views?
Your help would be greatly appreciated. Thanks a lot.
Merge Documents -> /Forms/Combine.aspx
Relink Documents -> /Forms/repair.aspxThese two views is actually hidden in SharePoint library, you can enable it by set hidden property to false.
download SharePoint manager, then find the site, root to the specified library, click views, find the Merge documents view, you will see that the Hidden propery is by default set to true.
http://spm.codeplex.com/releases/view/97332
Qiao Wei <br/> My blog:<a href="http://blog.goobol.com">http://blog.goobol.com</a> -
How to Find When A Document Library's Versioning Was Turned Off
We have a document library that used to have versioning on. It's since been turned off. How do we figure out when versioning was turned off and who did it?
whenever you upload a document in a document library, it published automatically if versioning is not enabled. Also you can check versioning details of the document which always say No version found.
You can verify version from library settings, and also can enable or disable versioning from the document library.
Document Library-->settings-->General settings--> Versioning Settings.
Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer. -
Custom document library showing wrong file type icon
Hi All - I have a custom document library created using VS code. In search result if any document appear from that library it shows web page icon.
I found this below url for this issue:
http://www.neilrichards.net/sharepoint/missing-document-icons-from-search-results-with-fast-for-sharepoint/comment-page-1#comment-1043
I don't want to write custom pipe line and I also don't want to hard code file types in XSLT.
Is there any solution to change content class?
There is difference in contentclass in source XML.
for
<imageurl imageurldescription="Image">/_layouts/images/imageresult_16x16.png</imageurl>
<contentclass>STS_ListItem_DocumentLibrary</contentclass>
icon is displayed correctly.
for
<imageurl imageurldescription="List Item">/_layouts/images/STS_ListItem16.gif</imageurl>
<contentclass>STS_ListItem_10623</contentclass>
Icon is displayed wrong.yeah its problem with library, But how to fix this?.
http://www.neilrichards.net/sharepoint/missing-document-icons-from-search-results-with-fast-for-sharepoint/comment-page-1#comment-1043 -
Detect what the default edit form is for a document library and list using jquery
Hi,
So what I have done is with some jquery made it that when a files are dragged and dropped into a document library and there is a required field such as "Metadata" the EditForm.aspx opens up for the user to fill in the required column. I am building
the url up from what I have found in SharePoints DragDrop.js file. This is all working perfectly I just need to find a way to dynamically find what the default edit form is for that document library as I have just hardcoded like this...
g_currentControl.strSiteUrl + "/" + this.ListName + "/Forms/EditForm.aspx?ID=" + id
So I need a way to figure out what the default edit form is instead of hard coding like this in case someone creates a custom_editform.aspx or something for one of the lists.
ThanksYou can get it by hitting this REST end point via JQuery:
http://weburl/_api/Web/Lists(guid'YOURLISTGUID')/Forms
Chris Givens CEO, Architecting Connected Systems
Blog Twitter
Maybe you are looking for
-
Adobe Reader XI will not stay open.
I recently installed Adobe Reader XI. Whether I open the program directly or double-click a PDF document the results are the same. I briefly see the blank Reader application window, then it closes. I have run the Repair function from Control Pan
-
Unable to install diisc 2 & 3 elements 10
I have a new pc laptop. I installed disc.1 of elements 10 - no problems. Then it said put in dics 2- I pressed OK before I took out disc 1 then my dvd disc slot wouldn't open until I went out of the adobe program. When I put my disc 2 in it only allo
-
Editing photo story in Windows media player to show in quicktime?
Is this possible?
-
[solved] pcmanfm 0.9.8 - "open with" dialog and applications sidebar
I'm running pcmanfm with fairly fresh reinstall of openbox and I'm still struggling to get my xdg/mimeinfo stuff straightened out. I've installed both lxmenu-data and gnome-menus and when I right click on a file and select "open with" it is blank. N
-
C501a downloads creates a denial of service
Greetings: I just installed the HP c510a photosmart printer and connected it to my XP Pro desktop. When I log onto the web via my 45Kbps modem connection, the c510a automatically starts downloading software or something else. With such a slow dial