Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jslink]

JSLink is the new feature introduced in SharePoint 2013, loading off the burden of XSLT webparts from the developer's mind.

0
votes
1answer
17 views

JSLink not modifying text

I am trying to get a super simple JS script to work on my SharePoint. I found this example here. This is what I am working with: (function () { var statusFieldCtx = {}; statusFieldCtx.Templates = {}; ...
0
votes
2answers
25 views

How to extract parts of a URL column

I've got a jslink client-side rendering file for an edit form. It has a url column for which the basic structure of the item data is returned like: "https://<link path>,<friendly display for ...
0
votes
1answer
37 views

Truncating our multiple line text fields inside our list views using JSLINK

I am working on an online sharepoint custom list. and we are rendering our list inside the classic UI. now inside the custom list's list view we have 3 fields of type multiple line of text. And if the ...
0
votes
0answers
7 views

Adding JsLink to Styled List

I have a List which I have created a view using the "Preview Pane" style I would now like to add a JsLink file so that I can restrict certain elements based on javascript (There is no search ...
0
votes
2answers
73 views

showModalDialog passed arguments not available on load

I have a page that is using SP.UI.ModalDialog.showModalDialog() to open a NewForm for a list. In the open code I'm passing some values in the args options property as described in this documentation. ...
0
votes
2answers
19 views

JSLink Was Rendering Then Stopped

I have two JSLinks on Custom List Webparts on my page -- one for a bootstrap slider, which is working fine continuously, and one for an announcements webpart. The announcements webpart was working ...
0
votes
1answer
26 views

JS Link Conditional Formatting Paging Not Working

I've added a list view webpart onto a SharePoint 2013 online page, this webpart has a JS Link to a file containing JavaScript which applies different CSS to the CurrentRiskImpactLikelihood column ...
0
votes
0answers
32 views

Custom content type selector in jslink?

I'm trying to customize the content type selector from a jslink file. I tried the standard approach, but it does not trigger : (function () { var customContentType = function (ctx) { ...
0
votes
1answer
22 views

Share point 2013 on premise-How to configure js link after upload into site assets folder in list web part

SharePoint 2013 on premise: How to configure js link file after uploading into site assets folder in list web part. In list web part settings, in JS link I have configured: ~siteName/SiteAssets/...
0
votes
0answers
50 views

JSLInk Managed Metadata and Multiline text field

using JSLink for a list NewForm and I have 2 managed metadata fields and a multiline text field. Only the last Managed metadata field is rendering. What am I missing? (function () { // Create ...
2
votes
2answers
99 views

JSLink - How to check the list item whether is draft?

I wanted to highlight list items which is checked-out and draft. I found a solution for checked-out items but I couldn't find how can I check the list item is draft (minor version). I am sure that ...
2
votes
2answers
118 views

How to highlight the row in red if expiration date is passed for SharePoint 2013 list

I am working with SharePoint 2013. In one of the lists, I have a date column called "Contract Expiration Date" (Internal name: ContractExpirationDate) which contains a date value. what I want do is ...
3
votes
2answers
112 views

JSLink support for document libraries in the Modern UI

do JSLink customizations work well in the modern UI for document libraries? I saw couple of articles which says NO JS/CSS Customization in modern UI Please advise on the same
4
votes
1answer
306 views

Can i add a JS Link to a list view in modern interface

I have the following JS link , which i have added to classic interface inside our sharepoint on-premises 2013:- (function () { function registerRenderer() { var ctxForm = {}; ...
2
votes
1answer
36 views

JSLink on Custom Form

Is JSLink exclusive to default forms? The JSLink field exists on my default forms, like below: However, it does not work when I create a new custom form via SP Designer, as below: Is this expected? ...
1
vote
1answer
46 views

Jquery code doesn't work after SharePoint ListView paging

I wrote a custom onclick event for a class in jquery, I have attached the script with JS link of listview web part. There is default paging in the listview web part. In first page the click event ...
0
votes
1answer
74 views

Modern-UI JSon Total Days Calculation in a custom-list allitems view

I needed to show the day the item is in open status. The days are only displayed in allitem.aspx. I was able to use JSLink to achieve it in classic UI. When the user switches to Modern UI, JSLink does ...
0
votes
2answers
45 views

Stoplight Indicators Pulling From Multiple Columns

I have a requirement asking for some crazy If/Then statements for stoplights. Fields I have: Need Date Column = Date/Time field Open Date Column = Date/Time field Modified Date = Date/Time Field ...
0
votes
1answer
68 views

How i can check if my Date Time field is less than Today() date inside JS script

I have the following JS script to color code our custom list items inside out list view, by checking if the item is status does not equal Delivered and its EndDate has been bypassed:- SP.SOD....
1
vote
0answers
25 views

Issues with trying to hide a column with JS Link in multiple webparts on the same page

I found a solution in the below post to hiding columns using JS link. However, I have multiple webparts on a page with different views of the same list and it is only hiding the columns in the first ...
0
votes
0answers
60 views

How to remove duplicates from the drop-down using jslink

I am using below listed JSLink code to perform cascading and its a working version except one issue. The Drop-down shows duplicate values because of how things are populated in the reference list, can ...
0
votes
1answer
110 views

JSLink code to filter lookup columns work on a Custom list's new and edit item form but not on document library edit item form

I am using JSLink code to filter lookup column to show relevant values. The same code works well on a custom list's edit form but breaks on the document library's edit form. I checked the ID of lookup ...
0
votes
1answer
34 views

Embed javascript with jslink

I have a simple javascript demo file [demo.js], stored in the [sitecollection]/[site]/SiteAssets/Scripts directory: <html> <body> <script type="text/javascript"> ...
3
votes
1answer
279 views

How to edit the default message (There are no items to show in this view) on an empty list-view webpart

I have 3 separate list-view webparts on a page and I want to modify the default message when a list-view webpart is empty. But I only want to apply this on one of these 3 list-view webparts. The code ...
0
votes
0answers
76 views

How to convert the below SPServices code to JSLink?

I am using SPServices to leverage cascading in for a parent-child relationship. Its working perfectly fine but I have to opt for JSLink solution as recommended by Senior Developer because it might be ...
0
votes
1answer
146 views

Sharepoint Online: Display publishing image and created by fields in dispform.aspx via csr

I've applied a csr js file to overwrite the rendering of dispform.aspx for a simple list. This displays every field correctly except for a publishing image and the created by fields which return "...
0
votes
0answers
57 views

JS Link not working to conditionally format 2 columns

I have been trying to use JS Link to format 2 columns in a webpart list. I have tested both scripts separately and they work, but when I try to combine them into one JS Link file, it no longer works. ...
0
votes
2answers
387 views

Is JSLink disabled in SharePoint Online?

Chris Cundy shared a link. 2 hrs Is JsLink disabled in SharePoint Online? I have been trying to get a CSR script that styles an annoucements list to work via JsLink however the style is not being ...
1
vote
1answer
151 views

Can't Open “Wiki page” in SharePoint Dialog Box SharePoint Online

Here is the code that I am using function openDialog(pageUrl,title) { console.log(pageUrl+title); var tempTitle= title.replace(/%20/g,' '); SP.UI.ModalDialog.showModalDialog( { ...
3
votes
3answers
284 views

Issue in lookup field when items are too large in lookup list

I have issue in lookup field. When item in lookup field are too large, it throws error "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string ...
1
vote
2answers
783 views

How to use jslink to change item row colour in a list view

I'm after a jslink to be able to add a background color to a list view. Like an alternate colour to make it more visible Any hints would be appreciated
0
votes
0answers
33 views

Is it possible to modify more than one list views of SAME LIST in a page through CSR (JSlink)?

Following this article My (custom code) Demochart.js is this: // Declare the variables. var sitesChart = sitesChart || {}; sitesChart.Colors = ['#1BA1E2', '#E51400', '#339933','#56348E']; ...
0
votes
2answers
584 views

How do you enable paging in a Sharepoint List View Webpart using Client Side Rendering

I have a list of a custom content type and are using a JSlink file to render the content of the list in a list view web part. I would like the list view webpart to display 30 items from the list with ...
0
votes
1answer
67 views

Extend List using JS Link with HighCharts

In a list view I want to override a value with a small chart with HighCharts... The Basic idea: Render the highchart into the jquery container and then return the HTML code: (function(){ ...
0
votes
1answer
247 views

JSlink: 'Title' and 'Description' returns as Undefined

Any help? Other fields such as ID works fine.. window.COB = window.COB || {}; window.COB.accordionItem = { customItemHtml: function (ctx) { var accordionItemHtml = "<div title='" + ctx....
0
votes
1answer
171 views

How to render list “LinkTitle” field using csr/jslink

the internal field name for "Title linked to item" is "LinkTitle" When added to a csr file though it's undefined. function CustomItem(ctx) { // Build a listitem entry for every item in the list. var ...
0
votes
2answers
85 views

Search Box (list web part) Error: TypeError: Unable to get property 'split' of undefined or null reference

Team, When I attempt to use the search box in a list web part I get the error, "TypeError: Unable to get property 'split' of undefined or null reference" Setup: On a Sharepoint 2016 page, I have ...
0
votes
1answer
372 views

How do I enable CSR to return the default rendering for a Select column in a list view web part that provides filter values to other list web parts?

I'm attempting to override the rendering of a Select column in a list web part that provides filter values to another list web part. In the code below, I'm attempting to not display the Selector icon ...
3
votes
2answers
52 views

How do I load user's data before JSLink renders the form

Below is my simple code to render the "Activitydescription" field in the newform.aspx. This is working. (function () { var ActivitiesListContext = {}; ActivitiesListContext.Templates = {}; ...
2
votes
0answers
423 views

Custom SharePoint List forms in SharePoint Framework

We are migrating old SharePoint 2010 On Premise code to SharePoint Online. Part of the SharePoint 2010 on premise code has custom list forms developed with visual Studio. Thought of using JSLink for ...
1
vote
1answer
92 views

How can I keep the default shaded alternate row colors to remain but have the affected rows change color according to the JSlink?

I have a list where I use "Shaded" View Settings > Style". It makes the rows dynamically alternately colored by row. However, when I apply the JSLink below to change the row color according to ...
0
votes
1answer
55 views

js link - open document in browser

I`v made a neat JS link and implied it to a document library that adds a image to a document that that have the archive field on "yes". the problem is that now the office documents doesn’t open via ...
1
vote
1answer
802 views

jslink hide or disable options in choice field on quick edit view for SharePoint lists

I want to disable or hide options in a choice field on a sharepoint list because some of the value should not be selected after a specific date but must be in the list for older items. Is there a ...
1
vote
0answers
203 views

Jslink is not loaded at all :(

When linking to jsLink file, with console.log - is not loaded. this is the script for example: <script> console.log("loaded"); </script> I use it on the list view webpart as "jslink" ...
1
vote
1answer
22 views

Applying a jslink on a field, how to know on which field the jslink is bound?

All samples and documentation I've red about JSLink shows that the field name must be known in the script file (ex: https://github.com/SharePoint/PnP/blob/master/Samples/Branding.JSLink/Branding....
0
votes
1answer
486 views

Filter SharePoint List based on values from another list

I'd like to filter SharEPoint list using values from another list via JS Link. I know how to filter using for example list of ID's. I found nice article for that but now I need firstly to connect to ...
0
votes
1answer
81 views

Is there any way to call Callout for a custom list item

I have 2 custom lists List1(Parent) and List2(Child). The new form of List1 has been customized to create 'n' of items in List2 through dynamic forms. The item in List1 and items in List2 shared one ...
1
vote
1answer
241 views

How to add JavaScript to a SharePoint Team Site List

I have a team site and would like to add JavaScript to influence the list's appearance. I have Custom Scripts enabled, but the "Form Web Parts" Ribbon option is grayed out and the JSLink Property ...
2
votes
1answer
62 views

After migrating my sites from SP 2013 on-premises to SP online, the JSLINKs associated with site columns did not work

I have SharePoint on-premises 2013, where inside some site collections, I define JSLINKs as follow, to disable site columns inside the quick edit grids:- (function () { var overrideContext = {}; ...
0
votes
1answer
386 views

How to use JSLink (CSR) for multiple views of same list in Same Page?

I have a page with 2 views of same list. When I use the JSLink to render one of the column (request_id) which is present in both the views, in one view JSLink is working fine, but on the second view ...