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
1answer
22 views

change date in infopath form via javascript

I have a sharepoint 2019 site. in this site i create a list with two column (1.name[text type] 2.Date[DateTime Type]). then i design this list in infopath. When I want to add a new item, I change the ...
1
vote
1answer
29 views

Migrate Current React JS Project to Run in Sharepoint

Our team has created a React SPA that is js based as opposed to ts. From what I've seen, creating and utilizing a webpart requires typescript. This project is fairly large so I guess I'm just ...
0
votes
1answer
22 views

I have an old webpart in XML and using SP services. I need to convert using Ajax

I was given an old webpart using SP services and XML. I was requested to use Ajax. This is the first time I do this kind of conversion and I am not sure if I am doing it correctly. This is the old ...
0
votes
1answer
18 views

Jquery and SharePoint Currency Field

I have a form with multiple SharePoint fields set as "currency". How do I put a currency field value into a variable? I've tried several version, such as: var txt01TotCash = $("input[id='...
0
votes
1answer
15 views

Adding request limit to Sharepoint/Office 365 API List search

I have a url I am using to query a list in Sharepoint formatted as below. http://sites/sites/site/_api/web/lists/getbytitle%example%/items?$select=Email/EMail&$expand=Email Because my list has ...
0
votes
0answers
12 views

Populate Fields when Clicking “Save” on Custom List

I have a SP 2013 Custom List with 2 automatically generated numbers. Currently, they are queried and populated upon selection of input values for the first 2 fields. The form works great for a single ...
1
vote
1answer
57 views

Script not Working inside of Folder

I am trying to enable the script below in a document library. I originally found this script here. Basically whenever a user drag and drops a file it pulls up a prompt to enter metadata. It is ...
0
votes
2answers
16 views

ClientContext showing data as undefined

I had some code similar to this one for getting data from property bag. However, I am getting some error that my variables are undefined. Even site and web are shown as undefined. What could be the ...
0
votes
1answer
12 views

Uncaught SyntaxError: Unexpected identifier [closed]

I am an artist and I want to make a gallery like in this video. I don't think that's the only error so any additional information will be good. https://www.youtube.com/watch?v=9UQzsZY070c I named ...
0
votes
0answers
19 views

Struggling with Sharepoint Alert Add-In

so I've been tasked by my company to basically start using Sharepoint in a more advanced manner. My first major task I'm trying to work through is building an add-in for a pop-up that basically does ...
0
votes
2answers
35 views

selectively hide webpart on homepage

My homepage has an embedded view of a list called Project Info which displays important project information. One of the fields is a choice field called ProjectStatus which can read either Pending, ...
0
votes
1answer
13 views

Pull Text from Drop Down Field to Single Line Text Box - SharePoint / Nintex Forms

I am trying to pull in the text from a Drop Down field on my Nintex Form into a single line text box within the same Nintex Form. Is there a custom JavaScript code that can be written to accomplish ...
1
vote
1answer
28 views

Compare one date field with himself but from others rows

I am using SharePoint 2013. Would you please give me a direction through which way I can accomplish this ? I have a list where I have a date field (let it be FinishedDate) with different dates. ...
0
votes
0answers
10 views

Clicking empty content editor webpart throws confirm window

We have a 2013 on-prem setup. We are site collection admin so everything is client-side and javascript, no access to central admin. We have a site using page publishing features and custom page ...
0
votes
2answers
23 views

Javascript to retrieve and validate file attachments in new item form

I have a requirement to inject javascript via a script editor web part into a form and validate that it's not a macro enabled Excel file (xltm or xlsm), and throw a validation error if it is and not ...
1
vote
2answers
32 views

Why is my webpart not hidden?

I have a promoted links webpart that I need to display only if a particular text string is displayed in another webpart on the same page. I can successfully capture the text string to a variable but ...
0
votes
0answers
9 views

How to display multiple calendar icon calendar events using jquery

I would like to view a sharepoint calendar using this view here Happy to do it using rest or CSOM but looking for a jquery plugin. Anyone done something similar or where can i find such a plugin. ...
0
votes
1answer
21 views

How To Apply filter to List View Web Part based on content of Data View field

I am building a project management tool. the top of each project page shows a List View webpart which displays information about the project's current status. A second List View displays a Task List ...
0
votes
1answer
13 views

Populate field onLoad Social feed SharePoint 2013

I am trying to auto populate user Email, Name, Title on a SharePoint form. I can see the values when I inspect the page (F12) but they don't appear on the form onLoad. I can obtain the input fields ...
3
votes
1answer
94 views

Pass file name having space to update operation using REST API

I am using on premise SharePoint server 2016.I am using rest api to update a list.I have a list having space in it's name so while passing this name it causes problem.Is it possible to pass file name ...
1
vote
2answers
37 views

Help to amend existing JSON to add a vertical align element

I currently have the JSON formatting applied to a column: { "$schema": "developer.microsoft.com/json-schemas/sp/…", "elmType": "div", "txtContent": "=if([$Review_x0020_Status] == '', '', '•')", ...
0
votes
1answer
43 views

REST API for setting Multiple users people picker in SharePoint

I inherited a custom application from another developer who used REST API to create list items. Now the requirement is to add a multiple users people picker to the form. I am able to add a multiple ...
2
votes
0answers
21 views

javascript to approve Microsoft flow

I have created several Approval flow. These flows send an approval email to approver and they work fine. Now I want to create a page (classic sharepoint) with all items of all flows to approve (...
0
votes
0answers
9 views

Data From Custom Edit Form Missing

I am using Sharepoint 2016 and I created a custom edit form on a list with tabs. I noticed that the data from the list item is missing. Fields that are filled out are showing as blank. How can I get ...
1
vote
2answers
33 views

Generate link to Manage Checked Out Files from Document Library URL on SharePoint Online

We have some users we have given access to override check-in on document libraries within SharePoint online, but don't want them to be able to change the configuration of the libraries. Because of ...
0
votes
1answer
23 views

Promoted Links list to show most clicked document library tiles

I am working with SharePoint online and on a subsite landing page, I am using promoted links list web part to render 8 tiles, one for each document library, when users click on these tiles, they get ...
0
votes
3answers
59 views

disable options in dropdown in sharepoint list

I tried this code to disable the options in the drop-down in the date picker time: Script editor: the value is still visible. But it is not working. Kindly advise.
0
votes
1answer
25 views

Read Excel sheet located in the document library in SharePoint Online

My requirement is to read the Excel sheet data which is located in the SharePoint Online library using JavaScript and get specific values from columns based on the comparison. E.g., if cell(a1-a20) ...
0
votes
1answer
26 views

Can I customise the time shown in the datepicker?

I have a scenario where users are to book sessions with date and time. Currently, I am trying two ways to enforce unique values for date and time. I added a date picker. I added a formula to validate ...
1
vote
1answer
24 views

Retrieve Date from Date/Time Field in SharePoint List with Javascript?

I am trying to pick up the date for each item in a list but I cannot seem to figure out all to get the value. I am using: var startDate = listEnumerator.get_current().get_item('Start_x0020_Date')
1
vote
1answer
28 views

JavaScript for SharePoint Traffic Light Color

I have a SharePoint site that uses a Traffic Light column to indicate color based on another column, "Due Date." However, we just added a new column called, "Actual Start Date." In the case where "...
0
votes
0answers
17 views

changing list view web part selected view with javascript

I have two lists, each with 5 views, and a dataview webpart displaying data from a third list. I want the two lists to automatically change there view based on the contents of the Phase field in the ...
1
vote
0answers
22 views

How to selectively hide links in a promoted links webpart using JS

I have a promoted links webpart with three tiles where the links direct to various approval stages and I don't want the m all to show at once. I want to hide 2 of the tiles by default and reveal them ...
1
vote
2answers
26 views

Field Value of Loaded List Item is Unexpectedly Returning “NaN”

I'm trying to query the last item in the current list where status = New, so I can auto-populate one of the fields based on the previous item's value. Executing "alert(collListItem);" displays "[...
0
votes
0answers
19 views

ajax web service call and how to handle the response

I have SharePoint 2016 Documentset and iam using webservice endpoint from SharePoint to download it as zip and wanted to upload into another document library in different site Collection. <script ...
1
vote
0answers
10 views

Update the index of the related object after spice in an object using JavaScript [closed]

There are 2 variables: var brands = [ {Brand: "Hyundai"}, {Brand: "Toyota"}, {Brand: "Honda"}, {Brand: "Volkswagen"} ] var cars =[ {Car: "Elantra", BrandIndex = 0}, {Car: "...
0
votes
0answers
5 views

Large document comparison in JS

I am creating code that will compare two large documents to identify the changes. Are there any JavaScript libraries that will accomplish this or help me to do this? Any guidance will be appreciated.
1
vote
2answers
32 views

CAML Query Last List Item Where Status = New

I have a SharePoint 2013 custom list and a requirement to load the last list item where Status = New. I first tried SPGetLastItemID with a CAML query filter - however, that method only returns items ...
0
votes
0answers
7 views

create an array for unanswered survey question items

I have a SharePoint survey and I need to create an array of survey questions that have been left unanswered using JS. Then I need to create an unanswered array index tracker where the ...
0
votes
0answers
9 views

Get Office 365 group members from REST API

I'm developing a solution to send SharePoint documents (links) to domain users sending an e-mail. This solution is based on a classic list form, where an user select a document and can choose user ...
1
vote
1answer
26 views

Disable Filter on Individual Column Headers of Custom List

I'm working with SharePoint 2013 and my Company don't allow the use of SharePoint Designer. I have created a custom list and am looking to disable the column header filter from a number of the ...
0
votes
0answers
34 views

Plain Text validation on presave function sharepoint

I have OOTB list. On new item adding I want to validate, on drop-down selection if value is USA three multi-line text box will show with mandatory field. I know we have to write validation on PreSave ...
1
vote
3answers
39 views

Script Editor web part not allowing me to insert code (or cancel)

Whenever I paste the following code into the script editor, instead of it allowing me to click 'insert', the entire window changes into the output of my script. There is no way to circumnavigate this ...
0
votes
1answer
34 views

PnP js call returns “Item does not exist”

I'm running a small code to upload file in a SharePoint 2016 document library and to change a metadata. Sometimes (but really often) my code returns error "Error making HttpClient request in ...
0
votes
1answer
19 views

Add jquery reference to JSlink file

I am using JSLink feature of SharePoint 2013, My JSLink file has code to get current user id and other details, for this I need to add reference of jQuery file. I tried adding those files in in ...
0
votes
3answers
46 views

SharePoint online add link to a document library on new list item

starting to use SharePoint online and I am loving it so far. However I need some guidance (if anyone can guide me by giving me material where to look at). Basically I want to modify the ItemAdded ...
1
vote
1answer
43 views

Color Coding List Item by Web Part based on value

I am currently trying to get color coding on a list to highlight good medium and bad properties. I have tried to follow the examples shown here for color coding: SharePoint 2013 Client Side Rendering:...
1
vote
1answer
87 views

Register Custom Action with Javascript

I am having difficulty registering a custom user action through JavaScript. I am using the following code example. The code executes without any error however the button fails to appear on the Ribbon. ...
0
votes
1answer
11 views

Javascript issue in Chrome with AddAnApp.aspx

I have created a piece of code which will check if your on addanapp.aspx page and if so it will read your permissions on a list and if you have EditList perms it shows 'Custom List' app only on add an ...
0
votes
0answers
18 views

Open built-in “Manage Access” dialog from javascript

SharePoint Online has a few nice dialogs such as "Manage Access" for a specific document. If you select "Share" for document you get this dialog: You can select "Manage Access" and get this nice ...