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
148 views

add new item button of 2 document libraries in a sharepoint page

I want to have 2 new item buttons of document libraries in a sharepoint page I tried copying the entire html of that element and adding it in the page, but that doesn't seem to work How I can have ...
5
votes
3answers
2k views

Where to store JSLink files?

I have a JSLink file which renders some additional information (e.g. a graph) for a out-of-the-box task list. I want to give anyone in my company the possibility to make use of this JSLink file. Where ...
0
votes
2answers
1k views

jslink is raising the following error “TypeError: Unable to get property 'style' of undefined or null reference” after using the QuickEdit Grid

I have added the following JSLINK to my site collection style library :- SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { SPClientTemplates.TemplateManager....
3
votes
2answers
397 views

how to verify if the current user is in a specific group before the page render with jslink on Sharepoint 2013 365

I get this solution, but I have a need of turn some fields read-only but a function of verifying executes after all functions and do not work correctly, any idea about what I can do? function ...
2
votes
1answer
490 views

Showing the Sum of a Fields using JSLINK will only Sum the items per current page and not per list

I am working on a list and I want to show the Sum of items inside my list view. so as mentioned in this Technet article, I wrote the following JSLINK: https://social.technet.microsoft.com/wiki/...
1
vote
1answer
609 views

JSLink for showing the Sum of my list columns will break if one item contain empty value.. it will return “NaN”

I am working on a sharepoint server 2016. and i want to show the sum of my list fields.. so i follow this appraoch:- https://social.technet.microsoft.com/wiki/contents/articles/30317.sharepoint-2013-...
2
votes
1answer
675 views

JSLINK is firing for one time only when the page first loads, and need to do refresh for the web page to get it firing again

I am working on a Team site collection inside SharePoint server 2016. I have the following JSLINK, which will show the sum of a column inside my list view:- var _totalValue = 0.0; var _totalColumn = ...
1
vote
1answer
389 views

Jslink / CSR Field Override Issues

I'm experiencing issues with the JSLink Override specifically for individual fields. When attached to items, headers and footers I have no problem, but the field functions don't fire at all. Code ...
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
1answer
60 views

Changing a calculated column from text to number within a default display webpart by jslink

I have a calculated column with the format of "number" in a list. However, within the display form webpart, the default settings actually returns a string with quotes " instead of returning it as a ...
1
vote
2answers
914 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 ...
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 ...
2
votes
2answers
3k views

Apply client side rendering (jslink) to all fields of type

I'm following this example for using client-side rendering for my edit form. I've modified it to make the Title not editable and I want to have a "fancy" rendering for a manged metadata column. (...
2
votes
1answer
2k views

How To Add Color To SharePoint List Column Background?

I have a requirement to make the background of a column in a SharePoint list colored (e.g. green). I have seen posts on CSR, JSLink, Conditional Formatting, etc. & all of these articles target ...
0
votes
1answer
542 views

Creating a custom view using JavaScript+Code Snippet Versus using JSLINK

I am working on sharepoint server 2013 on-premise, and i have the following requirement:- we want to create a new list which have 15 department items. such as HR,Finance,IT, etc. and for each ...
1
vote
3answers
589 views

Retrieve User's Work Phone on change of People or Group field in NewItem form using JSLink

I have one SharePoint list in which there are two fields: User (People or Group) Work Phone (Single Line of Text) On default NewItem form of this list, When we add User in User field then that user'...
0
votes
3answers
826 views

Simple technique for date rendering using jslink?

I'm using client side rendering/jslink for a list view. In most cases I want to completely transform the displayed value, for example This bit of my code which makes the version number a clickable ...
0
votes
1answer
88 views

Define fields in Template via JSlink question

I created the following code in JSlink and connected the file to a site column: Type.registerNamespace('hiddenFiledContext') var hiddenFiledContext = window.hiddenFiledContext || {}; ...
0
votes
3answers
496 views

What are the pros and cons of using JSLink to customize forms and fields in SharePoint?

I've noticed a massive trend of users using JSLink for customization, while I've always found it to be a bit of a pain. What does the community think?
1
vote
1answer
701 views

JS link with multiple custom lists

I have two custom lists in the side bar of my page. I have altered way it looks using the cisar app so that it displays just the images in a row with a title that I have entered manually above. Then ...
4
votes
1answer
382 views

CSR to render Task Status destroys Task checkboxes

I'm using some JavaScript to provide a more visual approach to a task lists column Percentage Complete. The script works fine, but I noticed that the task column Completed is not being rendered as a ...
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 ...
5
votes
1answer
712 views

JS Link - How to change a column based on another column's value

Hopefully this is quite simple! Here's my setup: I have a custom Status Indicator column (PSI), and a "Production Status" column. I want the PSI column to show a different icon depending on the ...
1
vote
2answers
451 views

Custom Status Indicator Column in JSLink attached to Content Type?

I'm looking to add a custom Status Indicator column to records within a document library, which would show an image depending on a field's value. "Pass = Tick.jpg", "Fail = Cross.jpg", that kind of ...
5
votes
1answer
870 views

Unable to write a jslink which defines a default values for my Dropdown columns inside the Quick Edit grid

I am working on a list view, where i have a choice column named TrackingStatus. Now for this choice column i defined the default value to be In Progress from the site columns settings. But i have ...
0
votes
1answer
2k views

Set gridcell value in quick edit with javascript

I have a new item form (masterdata) which should have several sub items that are stored in another list. The sub items should be entered using grid view and linked to ne newly created item. My ...
0
votes
1answer
417 views

Adding help text to a OOB sharepoint text field in New form using JSLink

I need to add helptext to OOB sharepoint Title(text) field similar to Sukunimi field shown below, I have explored that JsLink to customize the Title field can be used for the New form. how can i ...
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 ...
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/...
1
vote
2answers
323 views

highlight row on current user exists in a people or group column in a list view

I need to highlight a row in a list view, if current user is selected in a people or group field in this view, directly, or using SharePoint group. I really would like to do this using JS. Is this ...
4
votes
1answer
714 views

Run JS link file on just 1 web part

I have a page with 2 web parts. the 2 web parts are the same list just imported in different views. i have added a JS link file to 1 of the web parts using the edit web part properties miscellaneous ...
0
votes
1answer
236 views

Asynchronous update OOB field value with jsLink

In an edit form, I want to generate/update the filename of a document based on another field in the form. How to set the filename value after the other field changed ? At this point, I don't have a ...
1
vote
2answers
167 views

SharePoint JSLink or Inject Javascript

I have an SharePoint hosted app with a list(test). On the Lists/test/AllItems.aspx is there a way to inject JavaScript file with referenc to thirds party Javascript files like datables etc . Issue ...
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'...
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 ...
2
votes
2answers
1k views

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

I was working with JS Link in Sharepoint and managed to render a custom list. Here's a brief extract from the code: context.Templates.View = RenderBodyTemplate; SPClientTemplates.TemplateManager....
2
votes
3answers
191 views

Add a message inside my Create and Edit list forms, which explain that “*” mean the related field is mandetory

I have a team site collection , which have 6 custom lists. now our customer ask us to add a message when users create/edit list items , to exaplin what does the "*" means, something as follow:- now i ...
1
vote
1answer
1k views

How i can disable a column from the lists' Quick Edit Grid using a JSlink which is linked to list view webpart

I want to disable the Title column from the Quick Edit grid, inside certain web-parts so i did the following steps:- 1- I went to a list view. 2- Edit the page 3- Edit the web part. 4- Under the "...
6
votes
4answers
2k views

Can force the “Title(linked to item with edit menu)” column inside my list view to reference to another URL

I am working on a custom list, and inside the list view i am showing the Title(linked to item with edit menu) column. currently when users click on this column they will be redirected to the item ...
1
vote
1answer
79 views

Optimizing JSLink Script

I'm using JSLink to color code similar columns in a list view. I need set it up to color code 20+ columns, and the script I'm currently using seems a bit redundant. Is there a more optimized/less ...
1
vote
1answer
230 views

JSLink — how to suppress the standard rendering of a column label on a form

In producing a JSLink custom rendering for a particular field (I use Fields:, EditForm and NewForm templates), I seem to have gotten the field's default name rendered "for free" as its label, but I ...
0
votes
2answers
2k views

Is there a way to set JSLink for a Content Type?

I need to set up a complicated display template that's essentially attached to a single field; this field appears on 40+ sites in the same site collection, and I want it to do the same thing on all ...
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
0
votes
1answer
517 views

readonly fields on the basis of logged in User using JSLink

I am unable to make the fields readonly in EditForm.aspx on the basis of logged in User. The ctx.CurrentFieldSchema.FieldType throws an error "Cannot read property 'FieldType' of null" Below is the ...
0
votes
1answer
2k views

Unable to call SPClientTemplates.TemplateManager.RegisterTemplateOverrides from Context.executeQueryAsync in JS Link

exceute SPClientTemplates.TemplateManager.RegisterTemplateOverrides from Context.executeQueryAsync Success Below is my code (function () { var isCurrentUserInGroup; var flag=false; var ...
0
votes
1answer
1k views

Custom Lists - Conditional Formatting Cells based on Dates on SharePoint2013

So I was tasked with creating a conditional to highlight an item red when the date is overdue. With some help from you guys I was able to produce a JSLink that highlighted the entire row when an item ...
1
vote
2answers
986 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 ...
2
votes
0answers
554 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 ...
3
votes
3answers
193 views

JSLink Loop ends after first row

I'm hoping that you can help me with this issue. I've been wrestling with this one for days. I've been following everyone's posts for OnPostRender. I want to change the background color of the row ...