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
3
votes
0answers
449 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 ...
2
votes
2answers
6k views

JSLink: Is it possible keep the default list view header with column headers for filtering?

I am rendering a view with JSLink. Rendering is fine but is it possible keep the default list view header with column headers for filtering? I have tried this code in my dev environment. Issues: ...
1
vote
1answer
367 views

SPField_FormDisplay_Default is not defined

I have set JSLink to a field (LinkFilename) that required to return default rendering in some context. I implementation according PnP/ReadOnlySPControls.js, and use SPField_FormDisplay_Default to ...
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 ...
2
votes
2answers
619 views

Generate default “Name Column” fields values in JSlink (CSR)

I am having issues with "Name column" and its fields in libraries. I would like to iterate throuch each item and return default render value in this column in certain cases. I have tried lot of things ...
0
votes
1answer
851 views

NewDocSet and JSLink

I'm creating a custom field type and use JSLink for rendering this field in forms. Unfortunately, when I try to create a new Document Set, my .js file is not attached to the page and field rendering ...
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. ...
1
vote
1answer
3k views

JSLink and REST API issue with async

I am trying to use REST API inside JS Link. SPClientTemplates.TemplateManager.RegisterTemplateOverrides(OverrideFieldContext); function OverrideFieldContext(ctx) { var groupingName = ctx....
1
vote
3answers
2k views

Sharepoint JSlink ctx.CurrentItem[“Author”][0].title;

I am stuck getting the name of the Author/editor. I am overwriting the templates.item: var overrideCtx = {}; overrideCtx.Templates = {}; overrideCtx.Templates.Item = newView.customItem; ...
8
votes
2answers
2k views

What are the Type.registerNamespace advantages over standard JavaScript methods?

Now I dive deeper into the world of .Net developers I notice more and more Microsoft ways of doing things unfamilair to me as a (once LiveScript) JavaScript developer. I see PnP and other blogs using:...
0
votes
2answers
155 views

Client Side Rendering deployable via Sharepoint solution package

I would like to create a sharepoint 2013 solution (.wsp) that could be easily deployed and would contain a basic CSR(JSlink) that would modify all views in the site collection. I have been able to ...
6
votes
3answers
3k views

JSLink - Client side rendering -How to render custom display name with ICON in the list view?

I have been playing with JSlink and CSR. I was able to modify headers in my table with this code: (function () { function preTaskFormRenderer(renderCtx) { modifyHeaderData(renderCtx); } ...
0
votes
1answer
125 views

How to render filtered data in SharePoint list using JavaScript or JSLink

I have a custom list and I have to render filtered data dynamically. The scenario is, I have some SPGroups i.e. (Requester and Approver). If the current user is in Requester group then I have to show ...
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 ...
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 ...
4
votes
2answers
693 views

How to change WebPart appearance Title (WP Properties) using JSLink?

Is it possible to change the Title of the List View WebPart (Title property under Appearance) using JSLink i.e using overrideCtx properties? At present, I am modifying the Title using $('span:contains(...
0
votes
1answer
776 views

How to expand group with JSLink custom list views

If I custom render my groups on list views with JSLink, I (of course) overwrite the SharePoint standard code, including the javascript for expanding. function myGrouping(ctx, group, groupId, listItem,...
0
votes
2answers
524 views

JSLink OnPostRender ist not called at ListView

I completely re-render my listviews via JSLink. To keep the original filter popup layout (and solve this problem) I use the onPostRender handler to move the table headers around a little bit. This is ...
1
vote
1answer
528 views

Deploy JSLink file with XSLTListView WebPart

Hi I want to deploy jslink file along with XSLTListView webpart inside a page. The webpart is deployed in the page like the following: <WebPartPages:WebPartZone ID="main" Title="my zone" ...
1
vote
1answer
477 views

CSR Documentation [duplicate]

I am looking for CSR Documentation. If I Google something from the Server-Side API, I get the documentation right away. For example, Googling SPWeb, the first result is the documentation: https:/...
1
vote
1answer
1k views

Using JSLink to recreate the default view

I would like to learn how to completely override a list's view and recreate it using JSLink, if such a thing is possible. There appears to be a huge gap between the types of alterations I can make: "...
1
vote
1answer
690 views

Formating list with JSLink - “like” button

I am trying to reorder casual sharepoint list view which looks like this: To look like this: I am using JSLink and I have no problem with normal text fields like "Title" or "Description" but I dont ...
2
votes
2answers
3k views

How to extract the user name from ctx.CurrentItem.Author?

I'm customizing the DisplayForm with jslink and like to know how to treat the field Author and extract some informations. For example, the object ctx.CurrentItem.Author returns me this string: 10;#...
1
vote
1answer
3k views

How get item ID in JSLink on DisplayForm

I'm customizing the DisplayForm of a list, and I want put a button on footer to EditForm, but in the ctx has no edit form url and no CurrentItem.ID. How can I do this?
0
votes
1answer
4k views

Include JS Files in JS Link File

Is there a way to include another .JS file into a JSLink file? I have made mini framework to render list views which I want to source out in a seperate file and then add a normal JSLink file for ...
0
votes
2answers
76 views

JSLink distinguish between several Lists

I'm rendering some lists via JS link and I want to use postRender to move some containers via jQuery. Everything works fine as long as I'm displaying just one list. If I add several list webparts ...
0
votes
1answer
976 views

Display “created by” field using jslink without “object Object” error

Created by field is formatted as "name". Field ref used in jslink ctx override is: ...<span>Submitted by: " + ctx.CurrentItem.Author + "</span>... Field is present in view but all I get ...
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={' + ...
0
votes
1answer
599 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 ...
3
votes
1answer
4k views

Sum Calculated Column (SP 2013)

There is a very nice solution below from ViewMaster (http://www.viewmaster365.com/#/Create/Sum) that involves some scripting within the formula of a calculated column itself. However, the Sum will be ...
0
votes
0answers
149 views

Jslink “undefined” object

Usually undefined means I forgot to add a field to a view (!), but in this case I'm using a dataview and the field is definitely there. The key line - the undefined field is Image_x0020_upload: var ...
4
votes
2answers
2k views

Targeting specific list with Client-side rendering

I've read several walkthroughs on client-side rendering (CSR) and JSlink, and the methods to target only one list on a page instead of all lists. I understand that I can target using two things: ...
0
votes
1answer
208 views

how to access Target Audiences field using jslink?

Normally you access a field using jslink in the following manner: ctx.CurrentItem.Title but how can I access Audiences field for a given item? This does not seem to work: ctx.CurrentItem["Target ...
10
votes
1answer
429 views

Not able to set jslink property for a field without FullControl permisson on web (sponline)

For my SharePoint Hosted App, I set the jslink property of the field for customized rendering (JSOM set_jsLink). This used to work without having FullControl permission on web earlier. However, now ...
0
votes
1answer
429 views

Automatically collect WEBPARTID for rendering CSR (js-link) and paste them into a script JS

I am working on a rendering solution CSR (JS-Link) which uses the webpart ID list view to render. Rendering a JS file is located in a library on the site. The site is then registered model and ...
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 ...
0
votes
0answers
156 views

Retain list search box when modifying list item with jslink Sharepoint 2013

If I don't replace header and footer elements, the list search box appears but it doesn't work (ie it doesn't run and get results). Is there a way to retain this functionality if I replace JUST the ...
1
vote
1answer
194 views

I can't get the selected list items if the page is published

I can't get the array of the selected items on a published page. I used SP.ListOperation.Selection.getSelectedItems(). It all works if the page is checked out, but it returns nothing if the page is ...
1
vote
1answer
1k views

Pass dynamic parameters to JSLink for filtering

I am using SP Online 365 and having trouble working out how to show Custom List contents. There are 2 questions: 1. How to edit Link Location for item in Promoted Link list 2. How to add code to ...
0
votes
0answers
317 views

Disable/remove the “Best Reply” link inside my discussion board app

I have added a new Discussion Board APP inside my team site collection, but i do not want users to mark specific replies as "Best Reply".. so is this possible to remove or hide the "Best Reply" link ?
3
votes
1answer
2k views

Task List - Using a custom JS Link file, but keeping original menu options

I have added a 'Task List' app to my site. Out the box, when you click on the '...' menu option, you see a pop-up with a whole bunch of useful task list related details. However, I have also created ...
1
vote
1answer
297 views

Problem JSLink (color priorities) - Nothing changes

I have a problem using JSLink. The goal is to color in red, orange, green the priority field. For information, I followed step-by-step the tutorial given by Microsoft. In Site Features, I've ...
1
vote
1answer
273 views

When I delete an list item with a JSLink view template applied, it removes the View template and displays the raw data, how can I prevent that?

I have a JSLink text field that overrides the View template. It stores a few delimited values that it parses into an anchor tag: If I delete one row, the other rows no longer display the view ...
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 ...
0
votes
1answer
303 views

ViewData filed in the Schema.xml is not defined in the JSLink script

I have defined a site column which is rendered based on another column's information. Since I am not going to show that other column I define it in like: <ViewData> <FieldRef Name="...
2
votes
1answer
1k views

CSR Not working for multiple fields

Hi I have requirement to give display form link to the title and making description short for document library view. I have added below code using jslink. The title is rendering as per my requirement,...
2
votes
2answers
5k views

SharePoint 2013 JS Link edit form control

I have below code snippet to make fields in a SharePoint list edit form read only under certain conditions. This works fine but what I would like to know is how I can return the edit control for a ...
5
votes
1answer
3k views

modifying a site column using powershell without affecting its child list columns

I have a site column of type "Text", and users have assign this column a default value at the list level. so now my site column contains null default value, while its child list columns are having a ...
0
votes
2answers
2k views

JSLink doesn't “work” when limiting the items in a list view

I put custom stuff like textboxes and labels onto my list view via <JSLink> tag in Schema.xml. Additionally, I colorize list items <tr> background based on a field value. It all has to be ...