Friday, August 30, 2013

Show only the time in your sharepoint column

I hate that SharePoint does not provide a time only column. So, what should one do if they have a form in which their users need to record the time only?

In my example, I had to use a time/date column, called "Departure time" in which users needed to provide the time in which they departed  a location. However, I did not need a date.

Problem:
In InfoPath, I could delete the date portion of the form and leave only the time field. However, when I went to  the list view I would still see a date with their recorded time proceeding.


To get around this I used the steps below:
  1. Created a calculated column called 'Recorded Departure Time'
  2. Inserted the following formula: =Text (Departure Time,"HH:MM:SS")
  3. Edited my view to only show only my 'Recorded Departure Time' and hide my original 'Departure time'
Please Note: This method will show in military time. However, if you don't mind military time; this is a great solution.

Source: http://social.technet.microsoft.com/Forums/sharepoint/en-US/c8035f07-8320-48b5-98d7-f48dde2eaf2f/sharepoint-2010-insert-only-time-in-list-column

Change Link - "Add new item"

At the bottom of your sharepoint list, there is usually a link that say's "Add new item". This link bascially allows users to create new items in a list. However, what if you wanted it to say something different? In my case, I had a contact list and wanted it to say "Add new contact".

Using the steps below, I was able to sucessfully do so.

  1. Add a Content Editor webpart to the view you would like the link changed on. Please note: if you have more then one view for this list, you will need to repat these steps for each view.
  2. Add the javascript below, replacing "your message here" with the message prefer:

<script> document.getElementById("idHomePageNewItem").innerHTML="Your message here"</script>


  
  Source: http://dishasharepointworld.blogspot.com/2011/08/sharepoint-2010-change-add-new-item-and.html