Questions tagged [js]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
3answers
635 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 ...
3
votes
2answers
3k 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 ...
2
votes
1answer
389 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 ...
2
votes
3answers
669 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 ...
2
votes
1answer
28 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() ...
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 ...
1
vote
2answers
234 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
2answers
58 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
50 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
2answers
1k 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
80 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 ...
1
vote
1answer
183 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
2answers
40 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 ...
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 = ...
1
vote
1answer
284 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 ...
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 ...
0
votes
1answer
57 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
27 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
98 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
2answers
33 views

JavsScript/CSS Files in SharePoint Style Library/Site Assets not updating

We store all code files(.js/.css) in Style Library/Site Assets Library in SharePoint Publishing site. Sometimes, we/end users don’t see the updated JavaScript/CSS files in Browser even after clearing ...
0
votes
0answers
17 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 ...
0
votes
1answer
538 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 ...
0
votes
1answer
117 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.
0
votes
2answers
641 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 ...