How do I modify the Title Column of a Task List using JSLink

I would like to modify the title column of a Task List in SharePoint 2013. I would like to make the title column different colors based on a selection in another field. For some reason I can run the TitleRendering function
 on a different filed and it works perfectly, but when I try to run it on the Title field it is completely ignored. Is there some kind of work around for this?
var taskSample = taskSample || {};
taskSample.CustomizeFieldRendering = function () {
RegisterSod('hierarchytaskslist.js', '/_layouts/15/hierarchytaskslist.js');
LoadSodByKey('hierarchytaskslist.js', null);
// Intialize the variables for overrides objects
var overrideCtx = {
Templates: {
Fields: {
"Title": {
'View' : taskSample.TitleRendering
// Register the override of the field
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
taskSample.TitleRendering = function (ctx) {
var output = [];
switch(ctx.CurrentItem.Unit) {
case "Unit 1":
output.push('<span style="color: blue;">');
output.push(ctx.CurrentItem.Title);
output.push('</span>');
break;
case "Unit 2":
output.push('<span style="color: green;">');
output.push(ctx.CurrentItem.Title);
output.push('</span>');
break;
case "Unit 3":
output.push('<span style="color: red;">');
output.push(ctx.CurrentItem.Title);
output.push('</span>');
break;
case "Unit 4":
output.push('<span style="color: yellow;">');
output.push(ctx.CurrentItem.Title);
output.push('</span>');
break;
case "Unit 5":
output.push('<span style="color: orange;">');
output.push(ctx.CurrentItem.Title);
output.push('</span>');
break;
case "Unit 6":
output.push('<span style="color: pink;">');
output.push(ctx.CurrentItem.Title);
output.push('</span>');
break;
default:
output.push(ctx.CurrentItem.Title);
break;
return output.join('');
taskSample.CustomizeFieldRendering();

Hi,
Per my understanding, the TitleRendering function is not been applied to the Title column of the Task list.
I suggest you replace the “Title” with “LinkTitle” in your .js file:
var overrideCtx = {
Templates: {
Fields: {
"LinkTitle": {
'View' : taskSample.TitleRendering
In IE Developer Tools, we can see that the “name” attribute of the Title column is “LinkTitle”:
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • How can you modify the displayed columns on a Related Information List?

    How can you modify the displayed columns on a Related Information List? For example, how could you add the "Type" column to the List of columns displayed for Service Requests when you are viewing the Contacts Detail page?
    Thanks

    I'd have to say I think this is one of the biggest flaws in the OnDemand system currently. The solution I have come up with is to create reports and put them in webapplets showing the data I want to show. I have then removed the standard Related Info List Objects and added weblinks to create new records as the button on the List object is also gone.
    Keep in mind that doing this does slow things down a little, so it may not work if you have a big user base.
    RWB.

  • How can I copy the titles from a project volume one use them for the rest?

    I'm editing a four DVD set, and would like to use the same opening titles and credits for each. How can I copy the titles from volume one and use them for the rest? Thank you.

    Open the project that has the titles you want to use. Select (highlight) all the title clips you want, then right-click and choose COPY.
    Open the new project(s), then paste the titles onto the Timeline.
    Done.
    -DH

  • How do I get the last COLUMN in an Excel Sheet using Report Generation toolkit in LV7.1?

    I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
    Thanks

    Hello –
    I think the following example program might be helpful to get you started programming your application.
    Get Excel Data from Specified Field.
    Hope this helps!
    SVences
    Applications Engineer
    National Instruments

  • Can you modify the default columns displayed in standard lists?

    Hi,
    Is it possible to changes the columns displayed in the standard out of the box lists? e.g. All Companies.
    After making our customisations most objects need to have their standard list columns modified and I do not really want to have to re-create all the standard lists we want to use in order to get relevant columns displayed?
    Thanks for the help.

    Hi,
    I don't believe you can modify the out of the box lists without recreating them.
    Not sure if this will work for you, but a possible workaround would be to use Search Layouts to achieve your desired result. For example, if you were to modify the Search Layout for accounts to reflect all the relevant columns you need to display, then a simple search for "*" as the Account Name would result in a search for All Accounts in the list format you wish to see.
    Hope this helps.
    Regards,
    Cameron

  • How can you delete the history of your email recipents list using Yahoomail

    Everytime I go to compose a new email (using Yahoo mail) and type in one letter my old recipents pop up.I need to erase / delete them !!
    Is there anyway I can delete???
    I tried to delete the account and then activate again, the old recipient list is still there.
    Where in the settings (or else) can I do it.
    I got an Ipod and syncing it with the itunes of my iphone all of those old recipients were imported as well (Arghh!!)
    Any help suggestion woul dbe greatly appreciated.
    Thanks

    You would have to restore the iphone as new.

  • SPGridView - sorting Dates doesn't work properly & how to display the title column as link?

    Hi,
    I've got a SPGridView that is being filled with data from several lists. Some of them are a date-field and a title-field. I already added sorting, paging and filtering options and at first look they seem to work fine. But now I noticed that sorting dates
    doesn't work as expected. If I select ascending sorting, the result is something like this:
    01.08.2014
    02.08.2014
    17.07.2014
    18.07.2014
    23.07.2014
    If I select descending sorting, the result is this:
    23.07.2014
    18.07.2014
    17.07.2014
    02.08.2014
    01.08.2014
    This isn't what I want obviously. 
    I just added the EventReceiver for the sorting like it is shown in several tutorials:
    (The date field is a BoundField.)
    grid.Sorting += new GridViewSortEventHandler(grid_Sorting);
    private void grid_Sorting(object sender, GridViewSortEventArgs e)
    if (ViewState["FilterExpression"] != null)
    gridDS.FilterExpression = (string)ViewState["FilterExpression"];
    And my second problem is how to add a link to the title column. In my grid I'm displaying tasks from different lists and I want to link the title to the related task. I stumbled accross HyperLinkFields and tried this:
    HyperLinkField hyperLinkField = new HyperLinkField();
    hyperLinkField.DataTextField = "Titel";
    hyperLinkField.DataNavigateUrlFields = new string[] { "Titel" };
    hyperLinkField.DataNavigateUrlFormatString = "{0}";
    hyperLinkField.HeaderText = "Titel";
    hyperLinkField.SortExpression = "Titel";
    grid.Columns.Add(hyperLinkField);
    The resulting link is something like ...sites/MySite/_catalogs/masterpage/A1-V1-2 where "A1-V1-2" is the name of the task and also shown in the title field.
    The actual link should look more like ...sites/MySite/Lists/mytasklistname/DispForm.aspx?ID=.... or something like that to display the task details. How could I achieve that?
    Thanks in advance

    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27718782.html
    Here is the exact code you need to use:
    http://social.msdn.microsoft.com/Forums/ar/sharepointcustomization/thread/c463a8c6-4806-4233-b6a4-8db8369c5fc2
    http://sharepoint.stackexchange.com/questions/53459/change-title-linked-to-item-with-edit-menu-to-different-column
    Open the AllItems.aspx page for the specific list.
    Search for the <ViewFields> tag
    List item LinkToItem="TRUE" to whichever column you want the link:
    <ViewFields><br/>
    <FieldRef Name="Attachments"/><br/>
    <FieldRef Name="LinkTitle"/><br/>
    <FieldRef Name="linkThisColumn" LinkToItem="TRUE"/><br/>
    <FieldRef Name="data_x0020_column"/><br/>
    <FieldRef Name="Another_x0020_column"/><br/>
    </ViewFields><br/>
    http://sharepoint.stackexchange.com/questions/58954/link-title-in-list-to-value-in-url-column
    Create calculated column.
    Insert following formula -
    ="<a href='"&UrlFieldName&"'>"&Title&"</a>"
    Set "data type returned from this formula is" to integer.
    As a result on list view you will see the title with link to your url.
    UPD: It seems that URL field is not valid for calculated column, as workaround you can copy url value in a receiver into the another text field, which is not shown on the view.
    If this helped you resolve your issue, please mark it Answered

  • How can we modify the maximum no. of columns in pivot table ?

    hi all,
    How can we modify the maximum no. of columns in pivot table ?
    do i need to change the nqconfig.ini or instanceconfig file or else?
    thnx..

    A little search on the forum :
    In the instanceconfig.xml add a <PivotView> element under <ServerInstance> if one does
    not exist already.
    Within the <PivotView> element add an entry that looks like:
    <MaxCells>nnnnnn</MaxCells>
    where nnnnnn is your desired limit for the maximum total number of cells allowed
    in a pivot.
    Warning: an excessively large number will cause more memory consumption and
    slower browser performance.The details here :
    Oracle BI EE (10.1.3.2): Maximum total number of cells in Pivot Table excee

  • How can i change the title and image of  published exe

    Hi ,
    I have published a fla file in exe format .
    how can i change the title and image of this exe? do I ve to
    use some of the available softwares in the market? cant i do the
    customised setting in the flash player itself?

    On Fri, 4 Apr 2008 06:21:15 +0000 (UTC), "mFlexDev"
    <[email protected]> wrote:
    > I have published a fla file in exe format .
    > how can i change the title and image of this exe?
    I beleave the easiest way is to use PEResourceExplorer,
    Resource
    Hacker or similar software to modify EXE resources, such as
    window
    title and window icon.

  • Why isn't my SharePoint online document library showing anything in the Title column for PDFs I upload?

    I've got a document library on my SharePoint Online site. I've enabled the Title column in the library view. When I upload Word documents, the title I entered into the document properties list (Word 2010, File > Info > Properties list > Title) appears
    in the Title column of my library in SharePoint. But when I upload the published PDF version (created from the same Word file using Word 2010 by File > Save As) to the library, there's nothing in the Title column. Why? Is SharePoint failing to read the
    metadata of the PDF file? Is Word 2010 failing to copy the metadata into the PDF file when it's created from the Word file?
    What's going wrong and how do I fix it?
    When answering, please keep in mind that I'm a SharePoint novice.
    Regards,
    Bruce Officer

    I think I've ruled out the possibility that Word isn't saving the Title property with the PDF when I convert to PDF using Word 2010's built-in Save As PDF command. I found a utility called Evermap AutoMetadata which shows all the metadata saved in a PDF
    file and the Title field is indeed present in the PDF, with the correct value. Windows File Explorer won't show that property as present, but AutoMetadata does. It now looks like SharePoint isn't reading that field for some reason. Does anyone know why, and
    what I should do about it?

  • How can i select the next column instead of next row when press enter key

    I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged but column index will changed.
    Thanks to all.

    Well, the right arrow key will already move you to the next column, so the easiest way to do this is to modify the InputMap to have the Enter key invoke the same Action as the right arrow key.
    You can search the forum for my "Table Actions" (without the space) example that will show you how to do this.

  • Using SharePoint 2013 OIP the "Title" column is not displayed

    Using the SharePoint 2013 OIP against our SharePoint 2013 environment, I am seeing that the "Title" column is never displayed in any of the activities or published data.  This is the only limitation that is preventing me from using this OIP.
     Currently using the scorch OIP and am concerned that it seems is not being actively maintained.  Which by the way shows the Title column in all the same lists I am connecting to with the Microsoft provided OIP.
    Thanks for any guidance you can provide,
    Jim

    Hi Jim, this is something I've seen before. It may be a bug in the SharePoint 2013 IP, though it does work in some cases and not in others, so difficult to say what the cause is. My recommendation is to change your list to make the default Title column optional
    and hidden, and use a new custom field for the name of the item instead. See also:
    http://sharepoint.stackexchange.com/questions/118181/how-to-remove-title-column-in-sharepoint-2013-list
    Noah Stahl | Automys |
    Downloadable Microsoft automation examples and solutions

  • How can i modify the check constraint   in the table

    How can i modify the check constraint in the table. This table containts check constraint, condition is code_value between 1 and 4. codevalue is column name.
    Please suggest me.

    Go to tahiti.oracle.com, pick version browse reference manual and see the alter table statement
    Also read the goal of this forum.
    Your question is more appropriate to Database general forum
    General Database Discussions
    Gints Plivna
    http://www.gplivna.eu

  • How can I modify the speed of an titel?

    Hello,
    I have the following question. How can I modify the speed of an title.
    e.g. The "Starwars" Title.
    My problem is, that the words are flying in to quick.
    The people can not read the text...
    Thanks for your help!

    speed = length x time
    make you text shorter, or make the title appear longer to reduce speed.

  • How can I modify the new Hebrew language icon (א) to revert back to the Israeli Flag ?

    The Hebrew language icon in Mac has always been , at least for the last 20 years! However, in Yosemite, it's now א. How can I modify the icon? There must be a library of images somewhere in the System, where I can replace the icon...
    Thanks for your help!
    Eric

    The DOM Inspector (DOMi) has a menu item (Edit > Select Element By Click) and a toolbar button "Find a node to inspect by clicking on it" (left icon on the toolbar in the DOMi).
    * open the browser window in the DOMi (File > Inspect <b>Chrome</b> Document) and choose the first entry from the drop-down list.
    * click the "Find a node to inspect by clicking on it" button and use the keyboard (Alt Tab) or the Task bar to go back to the browser window (do not click in the browser window other than the title bar).
    * click that element with the mouse and keep the button pressed until you see a red border to indicate the the DOMi has located that element in the DOM tree.
    *DOM Inspector: https://addons.mozilla.org/firefox/addon/dom-inspector-6622/
    *https://developer.mozilla.org/Introduction_to_DOM_Inspector
    *https://developer.mozilla.org/DOM_Inspector

Maybe you are looking for