Questions tagged [jslink]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
104 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
551 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
46 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
76 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
215 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
57 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
651 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
1answer
249 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
2answers
1k 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
273 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
453 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
1k 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
2answers
1k 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
84 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
378 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
292 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
131 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
2answers
786 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
129 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
1answer
599 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 ...
2
votes
1answer
152 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
72 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 ...
2
votes
1answer
1k 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
444 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
29 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
703 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
154 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
336 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
90 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
589 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 ...
1
vote
1answer
209 views

Get title for list in csr file attached via jslink?

I need to get the list name (or title) the user is currently viewing to complete a url. I'm good with ctx.Currentitem references but no idea how to get list data like "title". Need something like ...
0
votes
1answer
277 views

Lookup Column Keeps Returning as Undefined

I am getting a TypeError that I cannot figure out for the life of me. I am unable to debug as my company forces IE11, and I do not understand its interface [I use Chrome, which I don't have access to]...
1
vote
1answer
339 views

Cannot Get JSLink to render on Custom List

I'm having difficult rendering my JSLink file on a Custom List. My code looks to be fine from debugging, and I don't see any immediate issues if I include the code in a Script Editor, but my changes ...
0
votes
3answers
606 views

How to display additional fields from Lookup table with JsLink

I have a list (Jobs) with a lookup field (Market) to another list (Markets) which contain the Market details (city,state,zip). In the View display, I want to show the Market name from Jobs as well as ...
0
votes
1answer
544 views

JsLink Sharepoint Change standard item view list to side by side

I want to change the Standard Sharepoint view List from standard view : Item1 Item2 Item3 To Side By Side Items : Item1 Item2 Item3 My JS : (function () { var priorityFiledContext = ...
2
votes
2answers
2k views

Can JSLink be used to add a new column in the list view?

I have been studying JSLink and its possible uses and have implemented some examples. But all of the examples work by modifying value in the existing column in a list view. Can we use JSLink to add a ...
0
votes
1answer
131 views

How to show link columns with datatables?

Is there a way to display link columns in a database table. I was following this but turns out link fields aren't display with a link. Instead the entire hyperlink is displayed which messes up the ...
1
vote
2answers
86 views

Function always return same value instead throw else clauseif condition is not valid

I have this query running from JSLink into list. It get current time from moment.js and compare date with sharepoint column ctx.CurrentItem.Cumplimiento; and return result into column ...
5
votes
2answers
2k views

sp.js and sp.init.js not loaded on Edit form in time for client side rendering

We have two different lists that we are setting up some jslink client-side rendering files for their edit forms. Both csr files use the SP.Guid.newGuid() function to id some DOM elements in the markup....
1
vote
1answer
287 views

Set column value depending of condition with JSLink

Entire JS (function () { var oFldCtx = {}; oFldCtx.Templates = {}; oFldCtx.Templates.Fields = { "Estatus": { "View": overrideStatus }, "...
2
votes
0answers
102 views

Custom Form Rendering RegisterTemplateOverrides in a promise issue

Using custom form rendering with JSLink, I fetch some data in promises before I attempt to do: SPClientTemplates.TemplateManager.RegisterTemplateOverrides(context); However because some of the ...
0
votes
1answer
599 views

Set current date time in datetime field using JSLINK CSR

Using CSR I am able to set value of date field, but for time field it's not working. following code works for date field without time: ctx.CurrentFieldValue = "01/01/2015"; return ...
0
votes
1answer
254 views

JSLink possibilities for List View

I could use a little guidance on how best to achieve my goals with JSLink and CSR. I'd like to turn this regular list view: Into this custom record layout: I already have the custom layout scripted ...
3
votes
3answers
2k views

Conditional formatting for SharePoint Online column.

I am working on a SharePoint Online 2016 site collection and need to add conditional formatting to a few drop down fields. The drop down options are: 1: Red, 2: Amber, 3: Green. I want the field in ...
1
vote
2answers
624 views

Set value of hidden column NewForm.aspx using JS Link CSR

How to set value of hidden column using CSR? Following is the code to set value of a field (function () { var ctx = {}; ctx.Templates = {}; ctx.Templates.Fields = { 'Title': { ...
1
vote
1answer
682 views

Where can the definition for GenerateIIDForListItem(ctx, x) be found?

I've been working with JSLink lately and have come across the GenerateIIDForListItem() method on several occasions. I see why it's being used but does anyone know where I can find documentation for it?...
0
votes
2answers
670 views

Need to change the value of SharePoint list using jslink

I want to change the value of one of my column in SharePoint list with the help of jslink. For that I have done and linked this file with webpart using but for me, the function "ViewTemplate(ctx)" ...
3
votes
1answer
1k views

SharePoint 2013 - Color Code Text in a Column

How would I color code text in a column when an overdue date threshold is reached? I created a calculated column (# days overdue) that shows total number of days the item has been open. When the # ...
2
votes
1answer
651 views

Converting a Customized Calulated Column into JS Link with SharePoint Online

I have been reading up on jslink for sharepoint online, and there are still some things that I am having trouble with. My goal is to replace all of my calculated columns containing HTML with a ...
0
votes
0answers
53 views

Error adding jslink property to a view via REST

I'm attempting to add a jslink script to a Promoted links list via rest. Despite jsLink referenced as a property of SP.View, I get the following error: The property 'jsLink' does not exist on type '...

1
2
3 4 5
9