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
1answer
2k views

CSR Error: Cannot read property 'style' of null

Trying to color rows based off of the value of the "Status" column However I cannot get it working as it keeps giving the following errors: TypeError: Cannot read property 'style' of null ...
1
vote
1answer
650 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?...
3
votes
2answers
1k views

Unable to get property 'get_current' of undefined or null reference in JSLink on list view

we need to filter list view items based on some conditions for which we need current context(sp.ClientContext). but we are getting undefined or null reference. we have also followed the solution ...
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 ...
7
votes
7answers
4k views

JSLink (js)file is updated, but still can't see any changes, maybe caching?

I am using SharePoint 2013 online (Office 365). I am following some JSLink tutorial where I am showing indicator icons in columns. It looks like the .js file is working, but when I change the file and ...
1
vote
2answers
907 views

How do I hide list columns in a view

I have 3 list webparts on my home page. I've used this script to hide 2 columns on page load and changes (sorting, filtering). // Override list views to hide language columns based on locale ...
0
votes
1answer
40 views

Set list value via JavaScript

I currently have a JavaScript that calculates the current activity of a radioisotope; however, it only displays the value (it does not actually set the field equal to the value). How can I go about ...
0
votes
1answer
17 views

Rename 'Like' link in custom lists

Is there a way to rename the Like/Unlike links in a custom list where rating has been enabled? 'Like' in our case would be misleading so we would like to have it show up as something like 'Confirm'.
0
votes
1answer
25 views

Is it possible to replace text of edit link without breaking functionality?

I have several SharePoint 2013 document libraries where I want to show the full document name (incl. file extension) instead of the default Name field. I know how to do this in a DVWP or by modifying ...
0
votes
0answers
20 views

Add linkToItem using Javascript

I am trying to add a hyperlink on a column which leads to the edit item menu. I know that it is possible to do this with SharePoint Designer, however as there is no more support for it, I would love ...
0
votes
1answer
598 views

JS Link create a Column / read metadata of a document

I'm new to SharePoint and JS Link. I have to read the metadata of a document in a document library. If the document is locked for the current user, I want to create an extra column and display an ...
0
votes
1answer
660 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 ...
1
vote
2answers
982 views

SharePoint JSLink Help required - Run Asnc code in OnPreRender

I am using JSlink file and using two functions (OnPreRender, Item). I want to customize Item rendering but before that I want to get data from another list using OnPreRender. The issue I am facing ...
0
votes
0answers
35 views

Exception calling “ExecuteQuery” with “0” argument(s): “Unknown Error”

I am working on a modern team site collection inside our sharepoint online tenant. I want to associate a JSLINK with a site column, so i run this PnP script:- $User = "***@***.onmicrosoft.com" $...
1
vote
1answer
952 views

Using JSLink to put Description beneath Title in DocLib

I just started using JSLink, and i think it's great! But now i'm facing a problem with the following... I have a DocLib where i want to display the Description field beneath the Title field. This ...
2
votes
3answers
3k views

Display the Actual “Related Item” in a Task List using JSLINK?

How would I go about displaying a link to the actual related item within a task list? Currently, when I display the related item field in the view, all it shows is '1 Related Item'. Is it possible ...
0
votes
2answers
3k views

I have a list a and want to use (CSR) Jslink to change the view but multiple fields

I have a list but want to use CSR - jslink to change the view of multiple fields. Can a jslink have multiple fields to change. Looking at the samples here Would like to merge 2 or 3 script in one ...
0
votes
1answer
52 views

Simple task: How to recolor a list line? [duplicate]

I just started learning Sharepoint. I have a problem that I can’t solve. There is a list. It is necessary that for a certain value in a particular column the display of a particular row changes - the ...
3
votes
1answer
638 views

JSLink Publishing HTML field is not in ctx.CurrentItem

I have the following JSLink template for rendering items in a custom list containing a number of columns of type 'Publishing HTML'. The template is used on both the default view (AllItems.aspx) and ...
2
votes
3answers
5k views

Is it possible to refer to a field hidden in current view from JSLink attached to current view?

I have the following JavaScript code attached to List's JSLink property: (function () { var coloringFieldContext = {}; coloringFieldContext.Templates = {}; coloringFieldContext....
3
votes
2answers
4k views

Hide more than one list column with JSlink

I am using CSR against two columns, both of which I need to hide from the list view. I have used this example to successfully hide one: function hideFields(ctx) { var cell = $("div [name='myField']...
0
votes
1answer
47 views

SharePoint 2013 - format webpart list column text not based on a condition

I would like to change the color and text size of a calculated column in a SharePoint 2013 not based on any condition. Searching online I have only been able to to find ways of applying conditional ...
0
votes
2answers
71 views

Change Column background color and text color

I am trying to change the background color of a specific column in this webpart because it's using percentage and not text I can't figure out how to get sharepoint 2013 to change the entire column a ...
3
votes
1answer
5k views

Uncaught TypeError: Cannot read property 'toString' of undefined

I have implemented the jQuery UI autocomplete functionality on a input field using JSLink. It works like a charm when I test it using Internet Explorer 9, 10, 11 and Chrome. Some users are however ...
0
votes
1answer
89 views

sharepoint 2013 list expand/collapse multiple line text column

I'm desperate and need your help on this script. I have a "multi line text" column named "Comments", and i added the following script into a script editor but it is not working for me. could you ...
0
votes
1answer
51 views

Change background color on list view selector

I have a few list views on SharePoint 2013. I want to set background color on the list view selector or set font color. How to do it? Thanks!
0
votes
1answer
33 views

Client Side Rendering

I have followed the guide (https://www.c5insight.com/Resources/Blog/tabid/148/entryid/653/how-you-make-sharepoint-announcements-grab-attention-easily-using-csr.aspx) to implement some client side ...
0
votes
0answers
22 views

Sharepoint 2013, JS link people picker field not working saving for multiple users

I am using below CSR code to set peoplepicker value to multiple person. I have multiple users to be assigned to my peoplepicker field. The code works when i pass current user, but it do not work for ...
2
votes
3answers
4k views

how to get the url of a list item in jslink?

I am using the jslink code below to display the title of the list in a List View web part as a hyperlink. But the problem is that I don't know how to point to the url of that item? so how can I get ...
0
votes
1answer
72 views

SharePoint 2016 Calculated Column Link Problem

Good day, I have a project and a very tight deadline. I have developed a tool for managing events. The system was developed in SharePoint 2010 which was migrated to 2016. I used a calculated column, ...
0
votes
0answers
9 views

JSLink not working

We have some custom JSLink code embedded in the edit form which works if a user opens the edit form directly, say to edit properties etc. However if the edit form is opened during the document ...
0
votes
1answer
101 views

JSLink for same list view webpart in a page hide some fields

we need to create single jslink file for 2 same list view webparts configured on the same page here are the rendering rules that is defined First Webpart should have some columns to be shown/some ...
0
votes
1answer
38 views

Rendering Multiline text value (JSON Format) which has Email ID Values in JS Link

we need to create a JSLink with multiline text value (Stored as JSON) with values seperated in three different columns sample schema for MultiLine Column: [{"email":"John@xyz.com", "skypeid":"...
0
votes
1answer
60 views

Add jquery reference to JSlink file

I am using JSLink feature of SharePoint 2013, My JSLink file has code to get current user id and other details, for this I need to add reference of jQuery file. I tried adding those files in in ...
1
vote
1answer
66 views

Get certain field from returned JSON object

I am editing a SharePoint List using JS Link. Within a SharePoint-Column, I would like to display information from another SharePoint column. The source is a SharePoint Person Column (Entliehenan). ...
1
vote
1answer
100 views

Color Coding List Item by Web Part based on value

I am currently trying to get color coding on a list to highlight good medium and bad properties. I have tried to follow the examples shown here for color coding: SharePoint 2013 Client Side Rendering:...
2
votes
1answer
561 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 ...
4
votes
4answers
267 views

How to add JSLink to a field through pnp?

I am trying to add a JSLink to my field through pnp so that it displays diffrently in the edit/new mode in the list that it is connected to, the problem i am having is that pnp throws an unknown error ...
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 ...
0
votes
2answers
700 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 ...
0
votes
1answer
88 views

Using CSR to hide field on list view but show on quick edit view

Is it possible to use the "ShowInGrid=True" element of the URL to act as a trigger for show/hiding a field in a datasheet view? The below code that will hide it nicely on the default allitems view ...
0
votes
0answers
21 views

SharePoint Online: How generated default toolBarTbl using JSLink (CSR)?

In my project I have to customize the custom list display form. I used jslink with the webpart properties: I overwrite the rendering Body function and I would like to generate the default toolBarTbl ...
0
votes
1answer
47 views

Use JS Link to Override Multi-Selector Field Rendering

I am working in SharePoint 2016 on-premise. I have a Lookup column that allows multiple values. It renders as the usual SharePoint multi-selector. I'd like to switch the rendering so it appears as a ...
0
votes
0answers
21 views

Grouped List coloring with js link not working

Based on this link in SharePoint2016 i tried to color a list. I failed. First everything was green. Then yellow. Now no longer work at all now no matter what i do (even using previous script). What ...
4
votes
2answers
1k 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
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 ...
2
votes
1answer
1k views

Display all documents list items, including subfolders in webpart using JSLink, as a tree view

I'm trying to find a way to do this: In a webpart on a page, create a tree view of all items in the "Documents" library, with folders, subfolders, and items (links to items). So my idea was to add a ...
0
votes
1answer
30 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
28 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
336 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 ...