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
Similar Messages
-
How to have a field automatically fill in another field when checked
Does anyone know if there is a way to have a field automatically fill in another field with a specific dollar amount when a field is checked.
I am doing a registration sheet for a charity event where we have to pay for each person that attends. I would like it set up so that when someone checks in the person at the registration table would just click the check box (E2) and then have it fill in the field next to it a dollar amount of $15.00 (F2) which would be owed to the place hosting the event.
Attached is a picture of the spreadsheet: example: persons checks off E2 and the amount $15.00 would automatically fill in field F2. I would then do this for each line and have the F column total the amount owed to the place.
I am VERY new to numbers and writing formulas so if you can be specfic with how to do the code would be greatly appreciated. THANK YOU!please remember to post the actual solution (equation in this case) so others that are searching for similar items see the solution, not just
Got it, replaced 0 with '''.
Thanks
Jason -
Moving information from last name field into blank first name field?
Is there a script (or does anyone know how I can make a workflow in Automator) for moving information from the last name field in Addressbook to the first name field (which is currently blank)? I want to move information from the last name field to the first name field in over 500 addressbook entries, and it would take me all night to do it manually.
Dear Michael,
the scenario is like we r implememting portal all our customers around 2000 .
so we cannt expect them to remember the same spellins as what we gave.
no one else can change other password as it need to give the id and email correctly
i have checked it in logon par file.......
the java files r not included in it..... to modify and deploy it again....
do u have any idea where we can change it other than java files or how to get this source files -
How to automatically make twitter @name fields into hyperlinks in Indesign?
Hi folks,
I have a book of tweets coming out and would like to publish Kindle, ePub and PDF versions of it, which would need hyperlinks throughout to work at all. So what I need is a way to automatically convert
@Me
into
<A HREF="http://www.twitter.com/Me">@Me</A>
as it were.
There are about 1000 of them, so I don't want to have to do it manually!
I have already used a GREP style to automatically format the @text (it's always one word, so it's easy) but the automatic hyperlink tool does not seem to allow customisation of what hyperlinks look like.
Does anybody have any ideas as to the best way to approach this?
Thanks,
IvanHello John... Thanks.. My problem in large part stems from the way InDesign handles hyperlinks and what happens during the pdf process.. I have been having real problems with the "shared" destination default etc.. Anyways: then I had to put in a twitter link and I couldn't find any clear description of how to do this in InDesign or the help community. I went around in circles.. The problem was with html tags.. and twitter exceptions and etc.. Anyways: the whole thing worked out after I spent many hours on the net.. mostly trying to find the right language to use to phrase the problem.. Not being a "tweeter" complicated issues.. (I had to do this for those who do tweet)... The answer, in short was this:
get a retweet button;
put retweet button in InDesign doc.
Post a tweet (in this case it was "Save the Date: HCV Training March 26, Houston TX [link to permanent pdf of the training flyer]..
Twitter will generate a short url.
In Twitter, hover mouse over post and then "More" pops up
Click on Embed
Copy Embed code
Paste embed code to text file
Make URL hyperlink for retweet button and in the Destination put: http://twitter.com/share?text=Save%20The%20Date%20Houston%20March%2026&url=http://t.co/AQV rqixC0O
Note: The above contains the message (after the text=) which must use %20 in lieu of any spaces in the text description. Then after the &url= paste the short url that you copied from the embed code.
Make sure that the InDesign link is NOT a shared destination and that it is a URL
Save file and export to PDF
As you can see... this took a while to figger out.. I found several posts on the internet but none stood alone... So here you go. -
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 -
Set unique file name for document library in SharePoint 2013
Hi,
I have document library in the sharepoint 2013 with two dropdown fields-dept name,dept id.
My requirement is to create a namiing convention for each file uploded in the document library.
So the naming convention should be "deptname-deptid-filename-Id".
I tried this naming convention using workflow as below-
In this case ,first I attach the file and then it asks for dept name & id,Whwn i input these value,it shows error message as this file is modified by you at this point of time.On cancel it saves the attached file but does not save the deptname and dept
id.
please help if any idea or suggestion.
Thank you.The only way I've ever seen this work while adding a new file is to use an Event Reciever. Build an Event
Receiver that fires whenever a file is added and have the code change the name of the file from whatever the user titled it to the naming convention you are using.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
Is it possible to give link of document library in sharepoint list in 2010
Hi All,
Using share point list data we have shown in reports. For this we create 1 view and shown as reports. we have 1 document library with title field, same field is in list also.when we click on link on list - it redirects to library folder.
Is their anyway to do that where as list is custom list.
Any help is appreciated..!Hi Bangara,
According to your description, my understanding is that you want to create a link in your list, then this link is linked to a library folder. Is it right?
You can create a Hyperlink field in your list as opening your list->clicking on ‘Create Column’ under List ribbon, then type a name for the column, select the type of the column is Hyperlink or Picture, and Format URL is :Hyperlink.
After that, when you create a new item or edit an item in the list, you can type the URL of the related library folder in this link field.
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Error when email enabling a document library
Hi - I've checked through other threads re errors when email enabling a doc library, but our scenario is a bit different. We have some custom code that creates sites based on a site template and uses data from a 3rd party system to define the site
name, permissions etc. I don't think that the process for creating the sites is relevant to the issue, but mentioning that anyway to be complete. As part of the site creation workflow, one of the document libraries is email enabled. However, on one specific
site, the document library was not email enabled. When I try and do this manually, I get the following error:
Error in the application. at
Microsoft.SharePoint.SPList.UpdateDirectoryManagementService(String oldAlias,
String newAlias)
at Microsoft.SharePoint.SPList.Update(Boolean
bFromMigration)
at Microsoft.SharePoint.SPList.Update()
at
Microsoft.SharePoint.ApplicationPages.EmailSettingsPage.SubmitButton_Click(Object
sender, EventArgs args)
at
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
Other tests/observations:
On the problem site, I get the same error when trying to email enable other document libraries
Other sites on the same site collection have been created using the same process/site template, and the appropriate document library was email enabled automatically (sites created both before and subsequent to this problem site)
I have successfully managed to manually email enable a document library on an different existing site
I have manually created a new site using the same site template and successfully managed to manually email enable a document library on that site
So I am fairly certain that it is nothing to do with permissions as other posts relating to this issue have suggested. Does anyone have any ideas on what is happening, how to resolve or further checks I can make? Many thanksHi qaaweb,
based on my experience, the issue itself may be caused by some triggers,
the permission is one of them only,
to narrow down usually, we try to update credential first, that at some environment may less impact.
example:
based on: http://technet.microsoft.com/en-us/library/cc262947.aspx, to configure email, if already configured then skip.
make sure that application pool account that is used for central admin to be the same for central admin, site and the web application.
make sure SQL server and granted DBCreator , Serveradmin, Setupadmin on service account.
remove old database and sync:
C:\program files\common files\Microsoft shared\web server extensions\12\bin>stsadm -o sync -listolddatabases 0
C:\program files\common files\Microsoft shared\web server extensions\12\bin>stsadm -o sync -deleteolddatabases 0
Update farm credentials, http://support.microsoft.com/kb/934838
if needed: central administration > Operation > Authentication provider and changed Kerberos to NTLM on central admin site.
Login service account on the SharePoint server and enable IncomingEmail settings on the web application
please let us know if the workaround is not applicable
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. -
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?
-
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 -
Changing Document Library Title via PowerShell
Hi there,
I´m trying to add a new Document Library in my SharePoint 2013 environment and change the title of it, due to URL reasons.
The Code:
$web = Get-SPWeb(“http://sp/s/doc”)
$list = $web.Lists[“Admin”]
$list.OnQuickLaunch = $true
$list.EnableMinorVersions = $true
$list.Title = “Admin2”
$list.Update()
The QuickLaunch and versioning settings just work fine, but the title of the library stays "Admin".
Any Ideas?
Thank You!Hi hank
This should be becoz of local resources.
That could be due to localization. In that case, you should also set TitleResource property:
field.TitleResource.SetValueForUICulture(new CultureInfo(1033), "My title");
http://sharepoint.stackexchange.com/questions/24163/how-to-rename-title-column-in-document-library-using-code
7down
voteaccepted
That could be due to localization. In that case, you should also set TitleResource property:
field.TitleResource.SetValueForUICulture(new CultureInfo(1033), "My title");
7down
voteaccepted
That could be due to localization. In that case, you should also set TitleResource property:
field.TitleResource.SetValueForUICulture(new CultureInfo(1033), "My title");
7down
voteaccepted
That could be due to localization. In that case, you should also set TitleResource property:
field.TitleResource.SetValueForUICulture(new CultureInfo(1033), "My title");
Please remember to click 'Mark as Answer' on the answer if it helps you -
Set the column order in document library using power shell
hi all,
am looking for a power shell script which set the column order in the document library, when i try to upload a document.
ie; i am uploading a doc to the doc lib. which has the below columns:
columnA - [choice field - mandatory ]
columnB - [lookup field - mandatory ]
columnC - [single line of text - optional ]
columnD - [choice field - optional ]
columnE - [choice field - mandatory ]
now when the end user uploads a document in my doc lib, i would like to see the mandatory columns takes up the top order and then optional fields.
columnA
columnB
columnE
columnC
columnD
so, is there any script, through which i can set the mandatory columns which will be coming in top and the optional fields as next orderThis is sample PowerShell code to reorder fields in a content type of a list.
$web = Get-SPWeb http://aissp2013/sites/TestSite
$list = $web.Lists["MyList"]
$contentType = $list.ContentTypes | where {$_.Name –eq "MyTestCT"}
$ctArray = "Title","ColumnA","ColumnB","ColumnD","ColumnC"
$contentType.FieldLinks.Reorder($ctArray)
$contentType.Update()
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field -
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 -
How to read the "Name" field from document library in workflow?
Hi,
The task I'm trying to accomplish looks pertty simple: I need to read a value of the item's "Name" field inside the workflow. I try to do it using LookupSPListItem and GetDynamicValueProperties activities. I can get value of the "Title"
field, also I created custom field and can read it too.
But the "Name" field always comes empty.
I guess I need to use some tricky syntax or this field has some different "internal name"?
The workflow is designed in VS 2013.Thank you. Looks correct, since when I enter this path (FileLeafRef) into GetDynamicValueProperties
and change Entity Type to list of documents it changes to Name
automatically.
But somehow it doesn't work too. (:
I also tried LinkFilenameNoMenu and LinkFilename
- same result.
EDIT: Solved. :)
Looks like FileLeafRef is not loaded by default by LookupSPListItem, so you have to pass this property name via
Properties collection. The bad news is that in this case other properties won't be loaded if you didn't add them to this collection.
Anyway, it works. :) -
Document Set Creation in document library using REST API in Sharepoint 2013
Hi,
I want to create the document set using REST API call. Currently i am able to create the folder and able to upload the files using REST API's in the document library. Is there any way we can pass the contentype name or Id and create the document set using
REST API call. We need to create the document set along with metadata and upload the files inside the document set.
I need to create the document set along with meta data column values using REST API. Please let me know how we can achieve this through REST API.
Thank you,
MylsamyHi,
According to your post, my understanding is that you wanted to create document set along with managed metadata fields.
The REST API does not currently support working with Managed Metadata or Taxonomy fields.
As a workaround, we can use the JavaScript Client Object Model.
Create document set using JavaScript Client Object Model.
http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
http://social.technet.microsoft.com/Forums/sharepoint/en-US/aacd96dc-0fb2-4f0d-ab4c-f94ce819e3ed/create-document-sets-with-javascript-com-sharepoint-2010
Set managed metadata field with JavaScript Client Object Model.
http://sharepoint.stackexchange.com/questions/95933/add-list-item-with-managed-metadata-field-through-jsom
http://sharepointfieldnotes.blogspot.com/2013/06/sharepoint-2013-code-tips-setting.html
Thanks,
Jason
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]
Jason Guo
TechNet Community Support
Maybe you are looking for
-
MSI K7N2 Delta-ILSR temperature issues
Dear All I have concerns with regard to the potential case/temperature rises as summer rapidly approaches. As the above MB has only two fan connectors I am looking at alternative ways to increase the potential connectors With this in mind I am look
-
AFAB posting end of the year on period 13 instead of 12
Hello, I've this request from accounting department. They would like to post depreciation for area 01 on special period 13 instead of 12 and with the following dates: DOCUMENT DATE: 15.04.xx+1 (following year) POSTING DATE: 31.12.xx This because
-
Steps to create a PVM for OVS/OVM 3.3.1?
Hello all, Has anyone created a list of steps, or wrote a blog, on the exact steps to create and run a PVM on OVS/OVM 3.3.1? Best, James
-
Creating infered entity instances
How can I create infered entity instances..in opa 10.4. When I am trying to write rule using the "exists" keyword.. its not compiling as "Infered Instance" but it compiles as normal conclusion. and how can I create inferred instances conditionally..
-
Form with inside a TabNavigator with FormItems
I have a Form that inside has a TabNavigator with differents tabs containing different FormItems, so the form is only one but the various FormItems are subdivided in different tabs. The form works good but the FormItems inside the TabNavigator have b