Document library field
Hi Team,
Please refer the attached document.
How to change the document owner field.
is it possible to change or edit that.
Thanks in advance
regards,
Shiny
Or do you want to edit the content? This can be done in the Edit Form or within the Document Information Panel but you must have Contribute rights.
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem.
Similar Messages
-
Linking a programmatically created folder in SharePoint Document Library.
I have created folders within a document library using InfoPath & C#. To that folder I uploaded several documents using several file attachment controls within the same InfoPath Form using the code behind the form. Now I want to create an Hyperlink
to each folder in another document folder's column that has the relationship with the previously created folder.
When I googled I saw there are lot of articles to create Folders ,uploading documents to folders in a SharePoint Library but I cannot understand how to create a hyperlink in a SharePoint Document Library field column.
Could someone help me to solve this matter?
Thanks,
Regards,
ChiranthakaWhy don’t you create a hyperlink column to store the hyperlink value, or you can use a lookup column to lookup the related folder item?
Qiao Wei
TechNet Community Support -
How can i find custom fields in a document library?
Hi, guys.
I need your help, please.
My users sometimes creates custom columns i document libraries using the SharePoint GUI. That's fine, but I need to distinguish these columns from SharePoints own columns. So here's my task at hand:
I need to find all the fields (columns) for a document in a document library that were added by a user, i.e. NOT SharePoint standard fields. Is there a way to do this, like a property or something?
In my case, I have an event receiver triggering on ItemUpdated. The following snippet iterates through all fields of my item and I can read the item title and the item value.
How can I filter this to only show title and value of
custom fields?
foreach (SPField field in properties.ListItem.Fields)
string title = field.Title;
string value = string.Empty;
if (properties.ListItem[field.Title] != null)
value = properties.ListItem[field.Title].ToString();
// Do something with 'title' and 'value'
Again, the code above gives me ALL columns and I only want columns created by users. If it's possible, I'd like to skip custom content type fields.Hi,
There is a custom column “CustomField1” in my library, after running the code, the output would be:
In fact, these fields do not exist in the
SPBuiltInFieldId object:
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbuiltinfieldid_members.aspx
As the documentation about these fields seems not being documented so well at this moment, to avoid the influence in your solution, you can exclude these fields explicitly
in the if block.
Thanks
Patrick Liang
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]
Patrick Liang
TechNet Community Support -
SharePoint 2013: Hide/Show Column fields while uploading document in Document Library
Dear all,
I have created a document Library LIB001 and I have created One Column of type Choice, drop down list, (CCHOICE) and I have created 3 other columns, (Column1, Column2, Column3).
What I want is while uploading a file in the document library, when I choose a certain value from CCHOICE, i want to show/hide and/or make the column mandatory.
Can anyone help/guide me how to achieve this?
Many Thanks
VinayDear all, I am trying the following code, but it's not entering the onchange of drop down list event. <script> $(document).ready(function () { var countryField = SPUtility.GetSPField('Document Type'); var countryFieldValue = countryField.GetValue(); alert
(countryFieldValue); // ----- Hide/Show the field based on new selected value. var id = SPUtility.GetSPField('Document Type').Dropdown.id; alert ('field ID: '+id); $('#' + id).on('change', function () { alert ('Inside on Change:'+countryFieldValue); if (countryFieldValue
== 'Type1') { SPUtility.GetSPField('Column1').Hide(); } else if (countryFieldValue == 'Type2') { SPUtility.GetSPField('Column2').Hide(); } }); }); </script> Can anyone help me please. Many Thanks & Regards Vinay -
How to control access to a document library based on fields of the list?
Hi,
I need to give access to a document library but the users who need permission are unknown until the form
is submitted to the document library. The 2 users information are in 2 fields of the form. I created a infopath form and a workflow with it.
I need to give the "CreatedBy" user, the person who completed and submitted the form, and the
Requester (a data field on the form), both need access to the new document library or just to the forms they submitted. How do I setup access for the createor and requester of the form? These are unknown until the time of the form submission and
it's dynamic.
Anyway to implement this in SP? If not what about coding for when the form is loaded. Can
someone point me to a sample coding for ref fields in the form when form is first loaded up? Also, how to redirect to a access denied view in the code.
Thank you.It's not easy OOTB but it can be done if you either use code or use some code someone else created.
Have a look at this on codeplex
https://spdactivities.codeplex.com/wikipage?title=Grant%20Permission%20on%20Item -
JQuery to set Title field to Name field in Document Library
I want to use some simple JQuery to populate the Title field of a document with the contents of the Name field. I am able to populate the Title field with basic text using:
<script type="text/javascript">
$(function() {
$('input[title=Title]').attr({value: 'Test'});
</script>
That works fine - but how can I change it to pass the contents of the Name field into the Title field? This code runs on the EditForm.aspx for the document library. Thanks!Are you editing the webpart in visual studio and designing custom webpart?
-
Document Library set "Title" field automatically equal to "Name" field
Hi,
Is it possible to make Title field in document library automatically fill up with File name field?Three ways you could do this really.
#1 - Write a custom event receiver using .NET
#2 - Write Javascript on the list form to update the field
#3 - Create a custom workflow that kicks in when new items are added or modified and that would set the field
Nikolas Charlebois-Laprade Microsoft Certified Professional Software Engineer and Senior SharePoint Advisor http://nikcharlebois.com -
In summary, I have created 3 document libraries and one issues list in a site collection.
The issues list has a form that has mainly been created in SharePoint 2010 but tweaked in InfoPath 2007 and one of the fields links to the title of a document in the first document library (so an issue can be linked/referenced to a particular document).
This all works great until I want to move a document (using the workflow that I built) from document library 1, to document library 2 or 3 as this is what I've set up to move documents through the business process we are taking it through.
When this happens, the link between the issue that was raised originally against the document is broken and therefore you can no longer tell which document the issue is linked with.
Does anyone know a way of 'setting' the field that is linked to data in another document library on original selection/creation of the issue, so that when the link is broken the original data remains.
Any ideas welcome as I am stomped!!!
Cheers!!
Louis Maxwell
Hi Louis,
According to your description, my understanding is that you want to keep the link field of the issue list working after moving the linked document.
Whether the link field is a lookup column or not ?
If so, due to the information source of lookup column cannot be changed, you need to add other lookup fields for document library 2 and document library 3. Just one lookup column corresponds one document
library. Then you can update the lookup column in the workflow when move the linked document. Such as when a document is moved to document library 2, you need to clear the lookup1 field (corresponding document library 1) and update the lookup2 field (corresponding
document library 2).
For updating the lookup column, you can refer to the following actions:
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Jquery for sharepoint document library form to filter dropdown/lookup field
I have created a document library to update status of a ongoing process. I have created a lookup column "status" with options
Initiated,
Reivew-in Progress,
Review-Denied,
Review-Approved,
Verification-In progress,
Verification-Denied,
Verification-Approved.
The demand from the client is they want to see - 'Initiated'in the form while adding a new document,other options should be hidden/disabled.
The next time when they edit the form,they want to see just :
Reivew-in Progress,
Review-Denied,
Review-Approved.
Other options should be hidden/disabled.
On the next step they want to see
Verification-In progress,
Verification-Denied,
Verification-Approved.
other options should be hidden/disabled.
I have worked with cascade drop down but i have no idea how to filter a single dropdwn/lookup field.Is there any way to implement this? Any help would be appreciated.
Thank you.Hi Slionel,
Based on you description, my understanding is that you want to show certain fields on NewForm.aspx and hide/ disable other fields and in EditForm.aspx you need to show or hide/disable certain fields based on condition. I would say you can use JSOM to implement
your requirement in NewForm.aspx and EditForm.aspx
based on the condition and requirement, it will be simple and straight forward.
Thanks
Shakir -
SPMenu Field for sharepoint document library
I have written code where it will show the Sharepoint document library in sp grid view.It
is showing the grid but i want the default spmenu field for the type icon. please see the attached image. Below is the code of mine
private void CreateBoundField(string sDataField, string sHeaderText, bool bReadOnly, SPGridView theGridView)
BoundField field = new BoundField();
field.DataField = sDataField;
field.HeaderText = sHeaderText;
field.HtmlEncode = false;
field.HeaderStyle.ForeColor = ColorTranslator.FromHtml("#808080");
field.HeaderStyle.Font.Names = new string[] { "verdana", "arial", "helvetica", "sans-serif" };
field.ItemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
if (sHeaderText.ToLower().Equals("type"))
field.ItemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
field.ItemStyle.Width = Unit.Pixel(35);
field.HeaderStyle.Width = Unit.Pixel(35);
field.ReadOnly = bReadOnly;
if (!bReadOnly)
field.SortExpression = sDataField;
field.Visible = true;
theGridView.Columns.Add(field);
SPGridView gv = new SPGridView();
gv.ID = "gv";
gv.EmptyDataText = "No items found!";
gv.AllowSorting = true;
gv.AllowFiltering = true;
gv.AutoGenerateColumns = false;
gv.EnableSortingAndPagingCallbacks = true;
CreateBoundField("Type", "Type", false, gv);
CreateBoundField("Title", "Title", false, gv);
CreateBoundField("Date", "Date", false, gv);
CreateBoundField("ProcessTask", "ProcessTask", false, gv);
DataTable dt = new DataTable();
SPWeb web = SPContext.Current.Web;
SPListItemCollection items = web.Lists["Shared Documents"].Items;
dt.Columns.Add("Type");
dt.Columns.Add("Title");
dt.Columns.Add("Date");
dt.Columns.Add("ProcessTask");
foreach (SPListItem item in items)
DataRow dr = dt.NewRow();
string value = item["ProcessTask"].ToString();
value = value.Substring(value.LastIndexOf(";#") + 2);
string docicon = SPUtility.ConcatUrls("/_layouts/images",
SPUtility.MapToIcon(item.Web, SPUtility.ConcatUrls(item.Web.Url, item.Url), "", IconSize.Size16));
dr["Type"] = string.Format("<img src='{0}' />", docicon);
dr["Title"] = item.Title;
dr["Date"] = item["Created"].ToString().Split(' ')[0];
dr["ProcessTask"] = value;
dt.Rows.Add(dr);
gv.DataSource = dt;
gv.DataBind();
this.Controls.Add(gv);
SPListItemCollection _GridCollection = SPContext.Current.Web.Lists["Shared Documents"].Items;
DataTable _MyDatabale = _GridCollection.GetDataTable();
gvdetails.DataSource = _MyDatabale;
gvdetails.DataBind();
I want the default menu pop up like the below attached image. Can any one help me to
modify the above code and get me the attached out put.
Thanks,
Sandy.Hi,
According to your post, my understanding is that you wanted to show the SharePoint document library in GridView.
You need to get hold of the SPFile object, which is a property of a ListItem item, and get the ServerRelativeUrl property. Then you need to add code to an <a> tag .
Here is a similar thread for your reference:
http://sharepoint.stackexchange.com/questions/88139/code-download-file-from-doc-icon-image-in-sharepoint-2010
More information:
Bind SharePoint 2010 Document Library to GridView:
http://sppractices.blogspot.com/2013/03/bind-sharepoint-2010-document-library.html
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
AJAX based field in document library default new form
I have a field in my document library which is reading data from another field in the same library.
For this to achieve I am using Lookup field which is working fine. But I want to change it so instead of a drop down where the user selects value from lookup, I want to give a textbox and as user starts typing, it reads data from lookup field and start displaying
results which user can choose.
I am talking about the same "instant search" feature which is commonly around or another example is User field in SharePoint form, which when you start typing user name, shows you name from the AD.
So is it possible to do the same in EditForm.aspx?Hi,
This is 100% possible by customizing editform using SharePoint designer. the solution you are looking for termed as Auto Complete text box.
there are various solutions available using Javascript.
Here is the reference for it.
http://www.codeproject.com/Articles/637675/Multiple-form-fields-autocomplete-for-SharePoint
If this is what you are looking for then please mark this as answer.
Thanks -
In a document library, offering only certain options for fields based on others selected
Hi, I have a document library, and when someone uploads an item to that library, they are presented with a form to select properties. I have 4 properties I want them to select (really 6, but the first two are Name and Title). The issue is that these 4 properties
depend on each other in this way:
1st property: I use a lookup to offer 4 choices, "A" "B" "C" or "D" in a dropdown.
2nd property: I want to offer the user a choice of 4 items in a dropdown, based on what they chose for the 1st property. (if they chose "A", then offer "1" "2" "3" or "4", if they chose
"B" offer "5" "6" "7" or "8", etc.)
3rd property: same thing as above, but now based on what they chose for the 2nd property (if they chose "1", offer "a" "b" "c" or "d", if "5" offer "s" and "t")
4th property: again based on 3rd property.
How can I do this? can I write some sort of custom form that can do this?What you're trying to do is commonly refererd to as 'Cascading Drop Downs'. These are a common lack in SharePoint.
There are lots of ways to do that, my favourite to use jQuery or Javascript:
http://www.sharepointboris.net/js/spcd/ -
I have an Access 2013 Web App in my Sharepoint 2013 online website. It contains a query to report on its data (several, actually, but let's keep it simple). I want to connect an Excel spreadsheet to the query, visualise the data in pivot tables/graphs/whatever,
save the spreadsheet in a Document Library, and let other team site Sharepoint users open the spreadsheet (preferably in Excel online, but with Excel client if it has to be) and see/copy the data, refreshed with the latest information from the Access Web App.
Simple, surely!
The way I'm doing it at the moment is to create an ODC file to connect to the cloud-based Access 2013 database, save that ODC in a Data Connection Library in the SP site, and use the saved ODC file as data source in the Excel spreadsheet. This works and
successfully keeps everything 'in the cloud' but I can't get it to refresh in Excel Online, and if I open the spreadsheet in Excel Client I have to enter the database password every time to refresh it. I don't really want to issue this password to everyone
who might want to view the data. There must be a better way than this ODC method, I suspect.
Googlings on this have led down various blind alleys - Excel Services, PowerPivots, Web Parts - but I'm stuck on which to follow through. Please, someone, point me to an article/book/website that explains how to do this step-by-step in simple language..
thanks
JonathanI don't see any quick way of achieving it - at least there's no such functionality exists in SharePoint. All you can do, develop an event receiver that will update the fields in the list item once the excel file is added/updated. You can use OpenXml API
to manipulate the excel file.
Thanks,
Sohel Rana
http://ranaictiu-technicalblog.blogspot.com -
The Create List Item workflow action does not work in document library with document template
My end goal is more complex but below is a basic example of the issue I’m having that just simply does not work.
I'm trying to use a site workflow to create an item in a document library that has a document template applied to it but the file that gets created by the workflow is corrupt and cannot be opened.
I created a document library and edited the document template by adding some text to the header and changing it to a Word docx file instead of a Word dotx file. I tested the document template by clicking the files tab in the ribbon and then clicking new
document which opens the document template in Word and allows me to edit and save the document back to SharePoint. Then I created a SharePoint 2013 site workflow in SharePoint Designer that contains a single Create List Item action, and that action creates
an item in the document library with the name field statically defined. I published the workflow and then manually start it on the site. The workflow completes successfully and when I navigate to the document library the document has been created by the workflow.
When I click on the document to open it in the Word Web App it throws the error pictured below and if I open it in the Word client application it just opens a blank document and not the correct document template.
I also tried using a SharePoint 2010 workflow with pretty much the same results. Opening the document in Word Web App gives the same error as above and opening the document in the Word client application gives the error pictured below.
Come on Microsoft creating a Word Document in a SharePoint Document Library from a SharePoint Workflow should just work! Is this a bug or does anyone have any ideas on what is causing the this issue?I had the same problem with corrupted document - this worked for me:
1. Create a 2010 Workflow which creates the list element in a document library
(you may start this workflow from your 2013 workflow if applicable)
2. In the Create New List Item properties - make sure to set ContentTypeId to your content type
("Id for indholdstype" is Danish for "Contenttype ID")
3. Your Content Type template should be a ".docx" file - NOT a ".dotx" file...!
(I have always created my templates for content types as .dotx files - seems Microsoft wants us to use ordinary .docx files as template files for content types)
Hope this helps you! -
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
Maybe you are looking for
-
My home computer which has my iTunes library on it how can I transfer all of my music from my iPhone to my new computer
-
How do I uninstall ADE completely in Windows 7?
How do I uninstall ADE completely from Windows 7? I have uninstalled it via Control Pane, or at least i thought I had. But when I reinstall it, it remembered all my previous details!!! (One of which is now incorrect!) That sure is some uninstall prog
-
I purchased CS4 back when. And I never had any problems running it on my laptop (Vista). I finally used up all my 250gb hard drive and my husband just bought me a new WIN 8 desktop. I tried INSTALLING using my CD but WIN 8 wouldnt allow me to install
-
I want to reload my mac to a fresh start (like when I bought it)
My laptop has been going extremely slow, and is running out of space. It says I have 1 gig of HD left, when I have barely anything on it and the capacity is 160gigs. Also my searchlight bar doesnt work, and i'm regularly having to force quit apps. So
-
Hi there, I'm wondering which fire wire port is compatible with the Pavilion P7-1455? thank you!