2022 Developer Survey is open! Take survey.

Questions tagged [javascript]

Javascript is a dynamic computer programming language, most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.

Filter by
Sorted by
Tagged with
1 vote
1 answer
7 views

Hide Multiple Choice field with jQuery

I have a field in an SP 2016 form that looks like this: I'm trying to hide the row that the multi choice field is in. I've tried multiple things. #1 doesn't work at all. #2 hides the check boxes but ...
user avatar
  • 23
0 votes
0 answers
9 views

SharePoint cannot get Access Token outside postman?

I need to get access token from SharePoint, In order to upload some files! I got access token from postman successfully, But when I try to do the same request with Javascript! const generateToken = ...
user avatar
0 votes
0 answers
21 views

Javascript: Correct Syntax to find if string exists in Array

In the DO..WHILE loop I need to extract 5000 items from a list (LookupList) and create a new list (arrayAll). I need to extract 5000 at a time as SharePoint has a limitation of 5000 items. I need help ...
user avatar
0 votes
0 answers
6 views

SharePoint 2013 - how to create a button that on click loads a modal with a second list pre-filtered where ID=@ID

Anyone have a script or function that would allow a on click to load a second sharepoint list into a modal pre-filtered based on current item's ID?
user avatar
1 vote
0 answers
30 views

Plotting of list data using pyscript

I have SharePoint 2013 and 2016 environments that I like to add some plots for some custom lists (webapp part) of SharePoint. I thought of using pyscript but I couldn't go too much further as I can't ...
user avatar
  • 111
1 vote
1 answer
17 views

How to combine two SharePoint columns into one datatable column?

I have a datatable that I want to show the information from my SharePoint List. The table has three headers: Name, Department and Address. The Address column should combine two SharePoint columns(...
user avatar
  • 11
0 votes
0 answers
12 views

SharePoint 2016 - I found code to embed hyperlinks to Month/Week/Day calendar view, but can I embed hyperlinks to my modified Current Views?

I have set up different Calendar overlays to group different types of events, and I would like to create hyperlinks above the calendar so that users can jump between the views (All Items, Meetings, ...
user avatar
  • 1
0 votes
0 answers
17 views

Try to generate unique ID

I have 4 to 5 dropdown fields and i have try generate unique id. For example:- In below image i have 4 fields. The series for the Unique ID( 1st four alphabet of each selected value) = Company + ...
user avatar
  • 45
0 votes
1 answer
10 views

Add code based validation to InfoPath forms for Sharepoint

I have a list where I use Infopath Forms. Users use these forms to enter data. They should also attach something in the form, but if they don't attach anything and click save, I want that the item is ...
user avatar
  • 101
0 votes
0 answers
17 views

SharePoint 2016 Calendar - Can you send a SharePoint Calendar event via Outlook? Even without any mapping of the SharePoint calendar?

So what I would like to do, from within a 2016 SharePoint Calendar, is to double-click a calendar event and click some kind of button that then opens up a meeting event in my Outlook, with all of the ...
user avatar
  • 25
0 votes
0 answers
11 views

SharePoint 2016 - Is it possible to have a recurring Calendar event and be able to Edit aspects of an individual event of its recurrence?

Okay, so I am going to try and explain my intention in case someone knows of a better way to achieve my desired end result ... So I want to use calendar overlays, each with their own color based on ...
user avatar
  • 25
1 vote
1 answer
28 views

SharePoint 2016 - I have code to open Calendar events into a modal popup window, but how would I tweak code to have the popup open in Edit by default?

So I found the below code, from the below link, which allows SharePoint calendar events to be opened in a modal pop-up view rather than loaded into a new page, but would it be possible to tweak the ...
user avatar
  • 25
0 votes
0 answers
12 views

Setting a field with predetermined values in a loop (child records) using map and arrays

I have a parent list (Product Catalog) and a child list (Approvers). When a parent record is created I need to create 4 child records each with a predetermined user id in the approver field in the ...
user avatar
0 votes
0 answers
14 views

Display Calendar Reoccurring Events as separate line items

Here is the scenario - I have a SharePoint calendar in 2019. When using calendar reoccurring events the event enters in the list as one line item with reoccurrence. What I am looking for is for the ...
user avatar
0 votes
1 answer
77 views

Conditional URL with ternary operator in a href tag in JavaScript

Can anyone help me in writing ternary operator in JavaScript in below line if href is empty set data.d.results[i].EncodedAbsUrl else data.d.results[i].ServerRedirectedEmbedUrl listItemInfo += "&...
user avatar
  • 35
0 votes
1 answer
55 views

Get Image URL in SharePoint document library

I have the below code which allows me to get all type of document URL for SharePoint which can be opened from link but there are images when trying to open it load the same page here is a format for ...
user avatar
  • 35
0 votes
0 answers
13 views

How to display information in chart for sharepoint list?

I am trying to display information from a sharepoint list in a bar chart. The fields I use are LTIOV (date field) and RFI_nummer (text field). On the y-axis I want to have the RFI_nummer and on the x-...
user avatar
  • 121
0 votes
2 answers
34 views

How to format results from rest api sharepoint jquery

I am using rest api to get results in below format but how shall append my result to get in desired format and on click document should open new tab my code function getListData() { var ...
user avatar
  • 35
0 votes
1 answer
20 views

How to restrict items in query

I am trying to load the data from a sharepoint list: var requestUri = "/_api/web/Lists/GetByTitle('Request For Information')/items?$orderby=LTIOV"; This code doesn't return anything. Only ...
user avatar
  • 121
1 vote
1 answer
474 views

Rest API Add item to sharepoint list - Cannot convert a primitive value to the expected type 'Edm.String'. See the inner exception for more details

I have this Rest API to add an item to a SharePoint list in SP 2016 on premise. I am passing information to it from global variables that get set in other APIs. The error I'm getting is: {"...
user avatar
  • 23
0 votes
1 answer
20 views

How to get right information from barChart

I am using the below code to create a barchart in sharepoint. The code is working but doesn't return the right information. The field "Reply" can contain three values: Nill Reply, Partly ...
user avatar
  • 121
0 votes
1 answer
25 views

how to fix Javascript function error saying expected ';'?

I use below code to create a Barchart on my sharepoint page. I checked the code online and all is fine, still while running it says ";" expected at ---> let barchart = new Chart("...
user avatar
  • 121
0 votes
1 answer
16 views

Unable to get property 'LTIOV' of undefined or null reference

I am using this code to retrieve data from my sharepoint list. Regardless of my Null check I still get the error saying unable to get property or null reference. $.ajax({ url: ...
user avatar
  • 121
0 votes
0 answers
8 views

Disable Columns (ReadOnly) based on value another Column (customizing out of the box list form)? Which model would be better? SSOM/CSOM/JQuery

I want to disable all the fields when a Person marks a column/field as complete. However I am afraid the client might be able to change the JQuery/Javascript code upon inspection. So what are steps ...
user avatar
0 votes
2 answers
16 views

Which columns are being returned from an AJAX call?

I know the names of some columns - FirstName, LastName, JobTitle, SAMAccountName, Department that an API serves out but I would like to know all the columns that are returned. How do I find out the ...
user avatar
0 votes
0 answers
9 views

Summary link web part Modal for individual item? (SP 2016)

I am trying to create a modal popup for a summary web part on SharePoint. The following code below works, but I want to only have a modal box for certain items in the list and not every single item. ...
user avatar
  • 1
0 votes
0 answers
40 views

Get a SharePoint list Id using JavaScript

I'm trying to open the list settings page of the list called 'Project Intake' on Nintex Form. However, it errors as soon as I change the name of the list. I was hoping to have a dynamic solution which ...
user avatar
0 votes
1 answer
33 views

Display check box for each row in html table [closed]

I am creating the HTML table using the rest api SharePoint. I want to add a check box for each row and on the selection of check box want to do the CURD operations. What to do?
user avatar
  • 77
0 votes
0 answers
13 views

How can I override ClientPeoplePicker JS functions to initialize it with a dynamic group in SharePoint 2016 On-Premise?

I want to override default functionality of the People Picker so that when it is initialized People from a certain "GroupID" are shown. We have to use out of the box functionality with ...
user avatar
0 votes
0 answers
74 views

Can get data from REST API with Postman, but not JavaScript Fetch request (localhost)

So I follow the tutorial in this link. Including the tutorial before it to set up an add-in. So my issue is that I am successful in getting the access token(Bearer Token) using Postman and then using ...
user avatar
0 votes
0 answers
8 views

How to bind client side customized data field with SharePoint out of the box list? SP2016/2013?

I have customized an out of the box form to replicate customized changes. However I want to bind this data with the list. SharePoint won't save the data on Saving or Stopping the edit mode.
user avatar
1 vote
0 answers
15 views

SharePoint Designer 2013: Including Javascript Code

I'm trying to include the following code into SharePoint Designer on a web page. How can I best do this? When I copy-paste, no results show. The site below mentions using a content editor web part, ...
user avatar
1 vote
1 answer
107 views

Uploading files from node/Express.js server to sharepoint

I'm trying to send a file to a SharePoint folder using the sp-request module. I can upload a .txt file and it opens correctly. But when uploading .docx files, the file becomes corrupted. My collection ...
user avatar
0 votes
1 answer
72 views

SharePoint REST API read large list items with pagination

We have a SharePoint 2016 list with 15,000 records and we need to get all the items using REST API. We can use top to read only top 5000 records. If I need to read data in sets of 5000 items and then ...
user avatar
0 votes
1 answer
44 views

SP.SOD.executeFunc

I am working on SharePoint 2016 and I have 2 functions I need to run: SP.SOD.executeFunc('sp.js', 'SP.ClientContext', FirstFunction); SP.SOD.executeFunc('sp.js', 'SP.ClientContext', SecondFunction); ...
user avatar
0 votes
0 answers
14 views

Hiding List columns and information with CSS or Javascript

I want to hide with CSS or JavaScript a column in sharepoint the header and the information below it. Specifically the column of created and modified by. I want to hide it even if those columns are ...
user avatar
  • 1
0 votes
0 answers
30 views

Sharepoint 2019 classic UI - how to show % complete in bar rather than numbers

I cant get the bar graph to work with new version of sharepoint, it worked in 2013 but cant get it to work in 2019(classic UI). is there a javascript code that could work?
user avatar
  • 47
0 votes
0 answers
23 views

Set value of a lookup field with Javascript

I have a question about custom list in SharePoint 2013. I made custom list basically with html, css and javascript. In my custom list I have 3 columns with lookup, the main column name is ...
user avatar
0 votes
1 answer
19 views

Sharepoint on premise 2019 - pass query string parameter to page title

I am looking for help with displaying the query string parameter on the page, column: project leads URL with Query string: https://xxxxxxxxxxxxxx/IAS_Projects/SitePages/by%20User.aspx?projectleads=joe%...
user avatar
  • 47
0 votes
0 answers
12 views

Someone attached in my Email SharePoint .html

Someone just email me with his request for quotation attached. The file extension is .html, when I open it in browser is StackExchange login page. I ask the person to send RFQ as normal person did; ....
user avatar
0 votes
1 answer
11 views

How to show output of an SQL query in Sharepoint 2013 web part?

Is it possible to use the SQL query that I have written and outputted to a web part through JS and display it as a table in a SharePoint 2013 web part?
user avatar
1 vote
1 answer
29 views

Enable dropdown based on another dropdown value in sharepoint 2016 [closed]

I have a dropdown: id="dropdown2" that is disabled upon loading the form. I want it to be enabled when I select a specific value in another dropdown: id="dropdown1". This is my ...
user avatar
  • 13
0 votes
1 answer
35 views

Deploying an application that uses SP.js

I have a big application that uses the SP.ClientContext (JSOM). I need to deploy it to one of these 2 options: SharePoint Web Part (https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-...
user avatar
  • 103
0 votes
0 answers
17 views

How to fit the contents of my webpage onto the window?

I am trying to fit the contents of the website to the screen so then I don't have to scroll up and down to see everything. From what I have read I will need to use javascript in order to accomplish ...
user avatar
  • 1
0 votes
0 answers
16 views

Get groups and permission level assigned to each item

I'm attempting to write a script that will get me all the permissions assigned to an item. Ideally I would need the group name and then their permission level (read, contribute, etc.). I got the group ...
user avatar
0 votes
1 answer
46 views

HTML Table for Column Description?

Is it possible to insert a small HTML table for the column descriptions. I have a bunch of acronyms that I use the description to have the definition of what they represent, and instead of having them ...
user avatar
  • 131
0 votes
0 answers
35 views

Open SharePoint on-premise 2019 documents in new tab

Using SharePoint on-premise 2019. I am having a difficult time trying to get documents in document libraries to open in a new tab. I've seen workarounds for SharePoint 2013, but nothing for the 2019 ...
user avatar
  • 1
0 votes
1 answer
24 views

can't refer my external library package as a single entry in config.json

I created a few libraries that I use in webapps and the webpack in the cosumer app is able to resolve the lib root when added to the externals in webpack and not bundle anything that comes from that ...
user avatar
0 votes
1 answer
7 views

Saving/Updating a Wikifield column for Wiki Library using JSOM

I've written some code in an attempt to keep a Content Editor Web Part in sync with a Wiki Pages Library. This code executes and states that it's completed successfully without error. Checking the ...
user avatar
0 votes
0 answers
50 views

Error: Failed to read the 'cssRules' property from init.js 'CSSStyleSheet': Cannot access rules

I'm trying to run a simple script to hide some fields in sharepoint online using the script editor itself: <script type="text/javascript"> function runAfterEverythingElse(){ ...
user avatar

1
2 3 4 5
107