Forum Discussion

LincolnDeMaris's avatar
Jan 13, 2017

Custom field rendering in modern list views

Hi SharePoint Developers,

 

We're working hard on making modern lists and libraries more extensible.  One feature that we're working on right now is a SharePoint Framework component that allows you to customize the rendering of fields inside modern list views.  In other words, this is a modern version of the classic Field.JSLink extensibility point.  We want to work with you guys on fleshing this out and enabling real scenarios that are currently blocking modern adoption. 

 

We'd like to gather more real-world examples of how people are customizing fields inside list views today.  Please help us out!  To get things started, below are a few field customization patterns that we're aware of and are considering how we can make them work with this new framework component.   We want to hear from you examples of scenarios that fit one of these patterns as well as scenarios you've encountered that are totally different.

 

Conditional formatting.  This is applying a different style to a field depending on its value.

Example:  I have a number field in a custom list called "KPI."  I want values between 0-20 in this field to be shown in the list view as red; 21-40 as yellow; 40+ as green. 

 

Supplementing the output of a field with more information.  This is displaying additional data inside a field alongside the data that's displayed by default.

Example:  I have a person/group field that stores contact information.  I want to display the name of the person's division next to their name.

 

Inserting links to actions.  This is placing links to actions on a list item within that list item's row.  Think of this as like a URL-based customaction, but the action is invoked by clicking the action's URL in the view instead of selecting that item and clicking a button.  We've heard that sometimes it's easier to train people to click a link in a row than it is to train them to select the item and find the right button in our menus.

Example:  I have a field in a document library called "Kick off Approval Workflow."  Client side code constructs a URL that kicks off an approval workflow (in SharePoint or in another system) for the item in question and places that URL inside that column.

 

40 Replies

  • So you are **not** going to allow generic Client Side Rendering/Display Templates/JSLink scripting
    as was implemented in SharePoint 2013.


    But instead, you are working on a technology to only allow specific scenarios?

     

    I would like what you described

    + interactive elements ("Who needs Forms?") like de CSR library: https://icsr.github.io

     

    I would like to continue working with the CSR editor Andrei Markeev developed: (the best thing since sliced bread)
    Cisar editor: https://github.com/andrei-markeev/cisar

    • LincolnDeMaris's avatar
      LincolnDeMaris
      Icon for Microsoft rankMicrosoft

      Generic scripting is powerful, but it tends to be fragile - customizations tend to break when we change our default UI.  Just ask our support team!  So we want to focus more of our efforts around making specific scenarios work in a robust, guaranteed way.  We want to build developer contracts that ensure certain scenarios (and scenario patterns) will work consistently as we make continuous updates to the service.  

       

      All that said, we have definitely not precluded giving developers the ability to do generic JSLink/CustomAction scripting on our pages - but we're trying to figure out how far we can get without doing that.

      • Danny Engelman's avatar
        Danny Engelman
        Iron Contributor

        Interesting word choice and double negatives refering  to double negatives. Are you sure you are in a Dev team and not from Legal?
        I am not a native speaker, so interpretation took some minutes..

        So, the answer is: Yes, Microsoft is working on scenarios to NOT allow generic scripting.

  • The modern version of the classic JSLink is definatelly important feature for my cusomers to use modern lists and libraries.

     

    An example scenario for JSLink today:

    Client has a list with project data and there's a column for the budget (maksumus). Project budget will be filled partially every month. With JSLink there is a link and a table to insert and display monthly payments. Total amount of monthly payments are calculated to Total field (Arveldatud summa).

    I know, its quite trivial, but similar scenarios are very common where I need to display data from another list in dispform.aspx or editform.aspx.

     

    I hope my example will help to develop modern version of the classic Field.JSLink.

    Good luck!

Resources