A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [jslink]

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

99 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
798 views

How to get the user profile property that is of type Managed Metadata using JavaScript?

I have apply JSLink to the custom list's new form. I want to query the user profile property which is Managed Metadata for entered user. I wrote below code which simply gives the string. But I want ...
4
votes
0answers
242 views

are JSLinks on WebPart , View , Fields mutually exclusive?

Elio Struyf already blogged in 2013 about a problem with missing Microsoft CSR Templates when you add a JSLink on the webpart. The checkboxes (from hierarchytaskslist.js) do not display. Seems that ...
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 ...
3
votes
0answers
249 views

Filter task list and have check box function at the same time

Both parts of my question have been answered other places but it is not clear if the two things I would like can happen simultaneously. I have a standard task list that I wish to filter by a lookup ...
3
votes
1answer
254 views

JSLink in form tag is not working from schema.xml in my SharePoint hosted app

In the app ,for schema here is my code from schema.xml <Forms> <Form Type="NewForm" Name="{65B105CA-E7D8-4B28-8C9F-5B0DCBA7E0CA}" SetupPath="pages\form.aspx" WebPartZoneID="Main" Url="...
3
votes
0answers
447 views

CSR ListView Pagination working in IE but not in Chrome

I've created the following to override a ListView I'm using to display an Announcements List to users. This works in IE9, enabling 'Asynchronous Update' has no effect on the results. In other versions ...
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
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 ...
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
1answer
89 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 = {}; ...
2
votes
0answers
96 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 ...
2
votes
0answers
209 views

JS Link not working for Calculated Column with OpenPopUpPage command (SPO)

I am trying to make a JS Link for a calculated column that creates a button that invokes a modal pop form. The Calculated column has the Internal Name 'btnEditor', external name 'Update'. Questions ...
2
votes
0answers
335 views

Unable to change the field type for “People or Group” from the built-in text field to be a drop down list

I have read the following article which shows how to change a "People or Group" field type from text field to be a drop down, which what i am looking for:- https://hyankov.wordpress.com/2015/07/15/...
2
votes
0answers
90 views

Sharepoint JSLink Sharepoint Hosted app

I have a List with a column exam type in it. I need to use JSLink so that I can format the List using datatables. I created a custom page called Exam.aspx and added the web part to the page but can'...
2
votes
0answers
553 views

Filtering & Sorting of the list not working, after applying JSLink with custom render

Following the anwser from this post: JSLink: Is it possible keep the default list view header with column headers for filtering? I managed to sucessfully register new template for rendering list ...
2
votes
0answers
232 views

JSLink override failing because SharePoint internally calls a method on the field object

Here is the scenario, that you can reproduce very easily : Create a Blog subsite on your SharePoint Web. Add a post and set the "Published" DateTime field (internal name: PublishedDate) Go to the ...
2
votes
3answers
175 views

Including a script in a jslink file

I'm building a simple app on a SP2013 online intranet that uses the Google Books API to pull in GB content (title, author, image etc). The goal is to modify a SP list view to populate the book isbn ...
2
votes
0answers
33 views

Store data in the list - save it to list itsef for CSR to read

I would like to ask if somebody has an idea how I can store formatting data for particular list/webpart on a page. My concept: I would like to create JSlink that would be attached in masterpage file. ...
2
votes
0answers
464 views

Sort ListView via Postback in JSLink file

I found out, that you can filter a list view in a JSLink File very easy by a postback: function filterList(ctx, filterField, filterValue){ __doPostBack(controlId, 'NotUTF8;__filter={' + ...
2
votes
0answers
483 views

JSLink on managed metadata column in Sharepoint forms

I have a requirement in which i have to apply custom rendering to my managed metadata field. I have to convert the term store hierarchy into a group of three drop downs. for example, I have an ...
2
votes
0answers
124 views

JSLink not displaying

This is my second display template, which is mostly a copy of the first one. All of the configurations are the same, but for some reason it's not firing when the page is loaded. here is the ...
2
votes
0answers
240 views

SP2013: Tabular view incompatible with JSLink checkboxes?

I'm using a JSLink file to replace a "Single line of text" column with a custom checkbox. For some reason, when "Allow individual item checkboxes" is enabled my checkbox won't work - I can't even ...
1
vote
0answers
41 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 ...
1
vote
0answers
406 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
188 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 ...
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?...
1
vote
0answers
64 views

CSR - Show list items horizontally

Am new to CSR. We have a requirement wherein we have to display list items horizontally. I looked for couple of links on internet by found them too complicated and bit confusing. Our guess is by ...
1
vote
0answers
108 views

Handling copy paste events in SharePoint 2013 JSGrid

Any idea how we can handle the copy paste events into the JSGrid. In IE we can copy from excel and paste(like in excel). I need to validate some columns on bulk paste. However none of the handlers are ...
1
vote
0answers
2k views

Using JS Link set field value OnPostRender

I want to set field values of different fields after OnPostRender using JS Link. I am able to create the field and set value, but I want to set value only and for the little task I think creating the ...
1
vote
1answer
52 views

Override or hook into default client side action?

Following is the setup. Have a custom list item with rating enabled Type of rating is "Like" so user can like or unlike the list item Have a page where the the list view is shown in the list view ...
1
vote
2answers
913 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 ...
1
vote
0answers
429 views

JSLink on SPField does not work in forms

SP2013 On-Premise farm solution. I'm trying to use Client Side Rendering to change how a specific text field is displayed. I want to implement a color picker, but I didn't want to have to create a ...
1
vote
1answer
50 views

SP2013 - Possible to implement like functionality through jslink or through data being pulled in via REST?

I have a list in our implementation my company uses for recognizing efforts of individuals at the company. Anyone can add an item to this list. The fields they need to fill out are "Who they are ...
1
vote
0answers
458 views

Sharepoint - JS Link - How to perform search in a custom list?

I was working on a custom list and fortunatedly, got a custom layout using JS Link to work. I now have a search box and my custom list items visible. While that's cool and all, I was wondering if I ...
1
vote
1answer
226 views

How do modify sp.ui.blogs.js JsLink in Sharepoint Online?

I am trying to modify the sp.ui.blogs.js JSlink using SharePoint online, but I cannot find this.js anywhere in SharePoint designer. Any ideas? Thank you
1
vote
2answers
983 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 ...
1
vote
0answers
357 views

JSLink: Publishing image field shows in page edit mode but not when page is saved

Similar to this: Can't get Custom Column of type Publishing Image to display in JSLink Publishing image field (Picture1) is in the list view Image shows up correctly in edit mode but not when ...
1
vote
0answers
68 views

Want to use Jslink for more generic way

I have written a JSlink for custom display of my announcement web part. JSlink is working fine and i can see the results. Now my customer wants to place 2 different announcement web parts in one page ...
1
vote
0answers
128 views

Combine JSLink of UserContextFilterWebPart and a XsltListViewWebPart

I have a WebPartPage which includes a XsltListViewWebPart and a UserContextFilterWebPart. In order to filter the results by the user office and 'connect' the two webparts, I added the parameter <...
1
vote
1answer
227 views

Styling the Discussions List

I am styling the discussions list web parts using CSR / JS Link. The OOB discussion list contains several buttons that allow you to select various "views", such as recent, what's hot and my ...
1
vote
0answers
134 views

'Srch' is undefined Shareponit View

I have a bug in JavaScript, 'Srch' is undefined in file sp.ui.listsearchbox.js, Line: 1, Column: 5673 this bug there is only on view, and I don't have any ideas how fixed this bug. Maybe ...
1
vote
1answer
278 views

JSLink use with content type hub and my sites

Content type hub is used in this scenario, to syndicate the content types and columns to several web applications. I'm setting the JSLink property in a custom field definition, to load the .js file. ...
1
vote
0answers
177 views

SharePoint 365: Change Lookup Column to Render HTML

In a Document Library I have a workflow that make a link to the document in a library for example <a href="https:/xxxx/label/GFN1671-01.pdf" target="_blank"> GFN1671-01 </a> In a List ...
1
vote
1answer
240 views

Enable Data View Caching JSlink

I have Enable Data View Caching unchecked and when i firts go in to my list i select the items i want to set color on press the button (pic1) and then it looks like this (pic2) when i after that ...
1
vote
0answers
268 views

How to group fields of a list under various tabs with JSLink

A simple tabbed view is achieved but I want that when the user clicks a particular tab then its corresponding fields are available for input only.
1
vote
0answers
243 views

Does JSlink work in ListViewByQuery Control?

I added a ListViewByQuery control in my Application page. I added few ViewFields using SPQuery, I customized the rendering of those fields using JSlink, The fields are showing properly in ListView, ...
1
vote
0answers
433 views

Custom JSlink template intermittently not downloading for anonymous users

I've developed a JSLink template that works fine. I've tested it with authenticated and anonymous access and it works flawlessly. The problem that i'm seeing is that when I open the page with the LVWP ...
0
votes
0answers
16 views

JSLink to get the number of files under folder

we need to display the number of files for each folder in a library how can we achieve this through JSLink? please help me with some code samples
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
0answers
37 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" $...