Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [js]

The tag has no usage guidance.

3
votes
3answers
472 views

How to show/hide columns based on value of SharePoint choice check box

I am working with SharePoint online and in one of the lists, I am using a choice check box column called 'Vehicle Type' with following choices: Personal Vehicle, Company Vehicle. I am looking to do a ...
2
votes
1answer
20 views

Order By Ascending with CamlBuilder()

How to write a function to order by ascending: true for date field. There is a picture library in our site. I find .OrderByDesc('year'), but I need it's opposite: var query = new CamlBuilder() ...
1
vote
2answers
36 views

O365, I have a Column Named 'Status' to show Green/Red circle but I am struggling

This is from a List and on List setting there are two Columns that involves the problem I am facing. Status (absolute name = ColorStatus) NewCol2 Users will enter in either 0 or 1 in NewCol2 field ...
0
votes
1answer
23 views

Syntax Error with ExecuteOrDelayUntilScriptLoaded(myF, “sp.js”);

I've a script referenced in List's view like : <JSLink>~/retrieveAlarm.js</JSLink> The first lines of the script show up an syntax error: $(document).ready(function() { ...
0
votes
2answers
43 views

Need help with JS syntax

I want to show/hide a div based on the value of a SP dropdown/choice column on form. I have written below code to this which is not written correctly. Can anyone help me with syntax to correct this? ...
0
votes
1answer
67 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....
0
votes
1answer
55 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 ...
0
votes
1answer
30 views

SharePoint documents library property

We have a. SharePoint library where users uploads their documents. Once a document is uploaded when somebody click on document it open the document itself I would like to change it to view property ...
2
votes
1answer
31 views

How to pass sharepoint site name dynamically in below working code

I am using below code in SharePoint online. Function loadcompanies takes one argument as projectName and that is used to perform filtering of a list column, it works fine. Currently I am hard-coding ...
0
votes
0answers
14 views

how to redirect users to a specific document library view page depending upon the content type they populate while uploading a file

I have a scenario where for a document library , i have 4 content types as: Lease, Loan, Finance, Admin. Similarly for each of these content types, I have respective views created. View names are same ...
1
vote
2answers
140 views

How to hide sharepoint column fields on Display form?

I am using below code to hide a field on SharePoint display form but unfortunately its not working. Can someone please help me correct it, thanks in advance. <script type="text/javascript" src="...
1
vote
0answers
18 views

Linking a sharepoint list to an external js file?

I would like the contents of searchStrings to refer to a list on sharepoint. Is there anyway to do that? document.getElementById('spe').addEventListener('keyup', function() { var kitten = ...
0
votes
0answers
78 views

How to set the SharePoint lookup value using JSOM?

For one of the Requirements, i have to set the value of SharePoint lookup column using JS/JQ. I am getting a value returned from a function and this value is present in the drop-down choices. So ...
1
vote
2answers
48 views

How to set sharepoint list drop-down to a value based on Site name user is working on?

I have two metadata drop-down columns added on a Shared Documents library upload form. I am leveraging SPServices to perform cascading and its working nicely. These drop-downs are: Project and Company ...
1
vote
1answer
47 views

How to leverage sharepoint cascading using javascript?

I have a parent list called called Items List residing on parent site containing columns as Site and Workspace. I created a Site Lookup column and named it as 'Workspace' which references Workspace ...
1
vote
1answer
160 views

How to correct below code to remove duplicate values from drop-down?

I am using below code to remove duplicate values from a lookup column called Project Name and for some reason its not working, can someone please help me correct it. FYI, i have already enforced ...
1
vote
1answer
883 views

How to show unique values in a lookup column?

One of the Projects I am working on, I have a site lookup column being used in many libraries across various subsites. The list column to which the lookup column is referenced to has some duplicate ...
1
vote
1answer
70 views

How to retrieve list items using JSOM while on SharePoint library edit form?

For one of the Requirements Implementation, I have to filter the Choice Drop-down values and from a condition perspective, i need to retrieve list items from a list called 'Company List'. The library ...
2
votes
3answers
472 views

How to hide certain choice values from appearing in a sharepoint list drop-down?

I have a site column which is a lookup column to a column in parent list. I am using this site column titled as Company Name in many libraries. What I want to do is for certain libraries, i want to ...
0
votes
0answers
18 views

How do I pass the value returned by one function to another function and do comparison?

I am working with Office 365/SP Online. For one of the Requirements that I am working with, I have two functions both returning values. Below is the code for first function, returning ctype. ...
0
votes
1answer
399 views

How to read the Lookup column value using JS/Jquery?

One of the Projects I am working on, I have a requirement to read the lookup column Value in a document library while uploading a document. For example, if someone uploads a document to the ...
2
votes
2answers
2k views

How to color code the SharePoint list column value based on a condition?

I have a requirement to color code a SharePoint list column value based on a condition. Please see the below screenshot. Basically as shown in the above image, I want to compare the value of columns ...
0
votes
1answer
92 views

Sharepoint 2010 list column to not to allow special characters and white spaces

I want to to some validation for Sharepoint 2010 list column to not to allow special characters and white spaces. Please let me know if any JS or Validation formula.
1
vote
1answer
248 views

How to use the Same Calendar Overlay(s) across 12 of the same Calendar web part on 1 page

This question references this post: Need to Display an Annual View Using Multiple Calendar Webparts on the Same Webpage So we were able to get the page set up with 12 of the same web part connected ...
2
votes
1answer
368 views

JS cannot get DOM element, changing text in web part

I want to change the text for "new discussion" for the Discussion Board web part to "new post." I've written this script that works when I try it in the console from Chrome dev tools (and yes, I do ...
0
votes
2answers
591 views

Custom New Form Not Working for End User

I have a custom form that I use an HTML file and JS file to span the fields that I designate and populate in the HTML fields. It has been working fine up until Friday, when the fields seem to not ...