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
0
votes
1answer
19 views

Checking if a list item combination already exists, and returning an alert using PreSaveAction function

I'm creating a script that will override submit form functionality when the save button is clicked. The goal is to validate user input by checking if a combination of columns already exists within a ...
0
votes
1answer
24 views

Get SharePoint URL using sp-pnp-js in SPFx

I have a SharePoint SPFx react webapp that I'm working on. I'm trying to get the SharePoint URL. For example: https://mysite.sharepoint.com/sites/sitename/SitePages/Home.aspx#/ So I want to get ...
0
votes
0answers
9 views

Collapse/Expanse multiline column in my sharepoint list 2013

I have tried few threads here to use the Java Script in a webpart to have a Collapse/Expanse multiline column in my sharepoint list 2013. Bu.t none of them worked. Can someone please help me? My line ...
0
votes
0answers
12 views

Setting document details when uploading to SharePoint Online

I need to be able to set certain column details when uploading documents to Sharepoint (mandatory fileds to be able to edit the files). async uploadFile(file) { let data = new FormData(); ...
0
votes
0answers
11 views

How to get a link preview

We are creating a feature in our SharePoint online classic site where users can share links to sites they find useful. In Yammer and Teams there is a preview that comes up when a user types/pastes in ...
0
votes
0answers
10 views

How to show column item having with same value in sharepoint list count as one in selectpicker dropdown with dynamic id

I am trying to build a function that will show repeated column item of sharepoint list in selectpicker dropdown having dynamic id . It shows repeated column value instead count as one. Below is the ...
0
votes
0answers
25 views

SharePoint Get list item with users/group permissions using Javascript

I have a SharePoint 2013 list with items that have unique permissions. Is there a way to retrieve an item along with the users/groups that have permissions to that item and what permissions they have ...
1
vote
1answer
17 views

I'm trying to run a javascript script through the script editor in sharepoint online, but nothing happens

In the script editor I have this code to disable some buttons: <script> document.getElementById(id="Status_c15b34c3-ce7d-490a-b133-3f4de8801b76_$DropDownChoice_Aprovado").disabled = ...
1
vote
1answer
7 views

Can I overload a URL to return multiple subfolders in a calculated column?

I have two images that are both located in my site assets folder and I want to show the two images based on when a source column returns "yes" or "no". I have a wrapped around a ...
0
votes
2answers
24 views

https://graph.microsoft.com/v1.0/users returns a 403 Authorization_RequestDenied

I have an SPFX application deployed on SharePoint online that requires to get the users of a SharePoint site collection. To do that I used the PNP Graph library using the JavaScript command graph....
0
votes
1answer
24 views

Apply a Custom Filter for a List View

So I came across the following post on Filter a list view using URL parameters, which is sort of what I was looking for but not at all at the same time. I have a custom DataTable on a SharePoint Web ...
0
votes
1answer
16 views

Copy attachments from list item to another list item

Case definition: i have item with attachments in list and i want to copy attachments to another list's item using web-forms and rest api probably I tried to use GetByTitle('')/id/AttachmentFiles, but ...
0
votes
0answers
10 views

SPFX - Injecting custom javascript at runtime from property pane field

How is it that libraries like StratusForms are able to provide property panes for users to write custom javascript on the fly at runtime and inject that into the page? I don't understand the ...
0
votes
0answers
13 views

Trying to upload the date type from excel to SharePoint list column

I am trying to upload date column value in SharePoint list column of "date and time" type. The below image of excel data: The "Date of Commissioning" value upload in SharePoint ...
0
votes
1answer
49 views

Cors Error when generating access token for SharePoint point online from a JavaScript application

Any help is much appreciated. I'm trying to save data from a html form to a list in SharePoint online. I'm using SharePoint REST API to add items to the list. Ajax call to generate access token is ...
0
votes
0answers
15 views

Need To Convert DOCX File To Latest To Manipulate XML on Client Side

My JavaScript-based web app uses the html-to-docx library file which produces a Word 2007 docx blob (zip archive), which is a compatibility mode version in today's Word browser and desktop ...
0
votes
2answers
26 views

SharePoint Online: Open up HTML files in browser

Before when I used SharePoint 2013, opening HTML files would open up in the browser and my JavaScript code works. Recently, my organization switched to SharePoint Online and I noticed the HTML files ...
0
votes
2answers
56 views

Javascript in SharePoint Online not working

I use the Modern Script Web Part to inject JavaScript into my site. I want to modify div elements by className with JavaScript. The script is running on my local PC but when I try to run it in ...
0
votes
0answers
11 views

I am trying update RequestId column in SharePoint list of multiple created item

I am trying to bulk upload the data from excel to SharePoint list on button click. The image is given below:- When we click on the "Insert" button. The data will save in the SharePoint list ...
0
votes
2answers
40 views

Update Sharepoint List Item with Javascript Client Side Object Model

For the past days I've been trying, with no success, to establish a connection to a sharepoint list (https://mywebsite.com/sites/concasbkcu/Lists/list_teste/AllItems.aspx) and update its items with ...
0
votes
0answers
12 views

Liking server file directory

I'm new to SharePoint and started building a page for my team. I am trying to link a Server Directory such as "file://server/serverdirectory/docs"(note: it's not mapped to any drive) --> ...
0
votes
0answers
17 views

How to convert CanvasContent1 html to normal

When I make a request for a specific sharepoint page, I get html in response, which only sharepoint understands. https://site.sharepoint.com/sites/portal/_api/web/lists/getByTitle('Site Pages')/items(...
0
votes
1answer
11 views

Trying to upload document in "Attachment" column of SharePoint list

I am trying to upload document in "Attachment" column of SharePoint list. I am able to upload the document but not view the document. The SharePoint list is given below image:- When I am ...
1
vote
1answer
11 views

Issues with links with url parameters in Sharepoint modern UI( I have to click link twice)

I'm using the modern script editor. What i'm experiencing is if i use the below <div><a href="/sites/Mysite/SitePages/People.aspx">People</a></div> it works But when ...
0
votes
0answers
6 views

trying to validate that a file was uploaded to sharepoint - fails with ECONNREFUSED 127.0.0.1:443

I have the following code that successfully uploads test.sspkg to my sharepoint app catalog. Now I'm trying to use sp-request to prove that it's actually there. But I'm getting an ECONNREFUSED error. ...
0
votes
2answers
21 views

AJAX Data From SharePoint List Not Carrying Over to Next Function

I have created fiddle with mock sample data that is formatted the same way as the AJAX response data. When I try to implement my script into a SharePoint script editor and debug it, it tells me that ...
0
votes
0answers
10 views

currentUser.get_Title() is not working for all users to update the list in Sharepoint 2019 On PremSite

I have a created a list for tracking users who have visited the SharePoint Landing Page. This list should contain visited users details like Name, E-Mail and visited time. But the problem here is, The ...
0
votes
0answers
30 views

Sharepoint column - Highlight if there is the same value somewhere else

I have a SharePoint library that contains different columns and files. One of this column has a number associated. Each number is unique but time to time, the same number can used for another file. If ...
0
votes
1answer
28 views

jQuery Datatable not loading - SPFX Application Customizer

I'm trying to migrate jQuery Datatable from On Prem 2013 to online, I'm gonna create SPFX application extension, where I insert the scripts in order, still datatable is undefined. $.fn.dataTable is ...
0
votes
1answer
25 views

.JS file opening blank in browser

javascript(.js) file opening blank in the browser, when changing name it's showing all content. ex - regular-method.js -> opens blank regular-method1.js - opens with all it's content
0
votes
1answer
25 views

How to subtract a year from sharepoint date using javascript

I have a date column (Date Time only) Display format for the column is standard I tried the below var te = new Date(ctx.CurrentItem.Due_x0020_Date); I get this output : Fri Mar 12 2021 00:00:00 GMT+...
0
votes
1answer
28 views

Identify if guest sharing is enabled in SPFx

I tried using context.pageContext.legacyPageContext.guestsEnabled, but it returns false when external sharing on the site is set to "Existing guests only" and works fine for "New and ...
1
vote
1answer
22 views

How can I get ID when I insert new items to list?

I'm currently using JSOM to insert new items to list. var clientContext = new SP.ClientContext(); var oWeb = clientContext.get_web(); var oList = oWeb.get_lists().getByTitle("request&...
0
votes
1answer
27 views

How to join the multi row value in single row of SharePoint list

I would like to submit the multiple line item value in single row of SharePoint list. The result of the actual submitted value in SharePoint list is shown below image:- If the column value is equal ...
0
votes
0answers
19 views

Filter link items from list using Page destination column and site Page name

I have a request from a client to use an link library (list) for multiple pages, the idea is to have one link library where you can put a name of a page destinaton, i.e.: Link Icon: "redfolder&...
0
votes
0answers
23 views

Error handler for gulp-spsync call is never reached

I am uploading and deploying sharepoint packages via gulp. Sometimes, it's possible that the app catalog folder doesn't exist, and so the upload will fail. I'd like to just make a note of the error ...
0
votes
0answers
16 views

How can one fetch values via JavaScript from a SharePoint list with columns that have values stored via term store

I have a jqGrid where 2 columns have values which come from the termstore. The values in the column "Mandant" and "Vertragspartner" are stored via term store management tool and ...
1
vote
1answer
22 views

SharePoint Framework not working with script tags

I'm trying to create a web part within SharePoint framework which includes <script> tags however they do not run while in SharePoint, see example code below: public render(): void { this....
2
votes
1answer
60 views

I am trying to get the choice type field value in select tag from SharePoint list

I am trying to get the choice field value in select tag from SharePoint list. Here, the code is given below: function GetphysicalVertual() { var defPG = $.Deferred(); var inputElement; $....
0
votes
0answers
8 views

Modal JS not working in Chrome for Calendar CEWP

On a site page, I have a Calendar CEWP and the following JS in a script editor. The calendar events pop up in a modal in IE but they do not in Chrome. Can anyone identify why it is not working in ...
0
votes
1answer
20 views

item is undefined in SharePoint Online but works fine in SharePoint 2013

Long story short I'm migrating SP2013 to SPO. Unfortunately the code is producing an error in the browser console that collListItem is undefined. All I did was to replace the addresses where needed ...
1
vote
1answer
40 views

How to add users to a list by REST API before they are added to a list manually

I'm using SharePoint Online and SharePoint REST API v1. I realize that after a user is added to people column of a list manually, I can get user ID and add this user to a column by the API. But I need ...
0
votes
0answers
23 views

Validate user name and password in custom edit form in Sharepoint online

Existing Sharpoint 2013 on premise system list has a Infowise signature component. Infowise adds custom column which validate user name and password on saving list item. Since we are migrating the ...
0
votes
1answer
31 views

How to get list of folders data from SharePoint List using Javascript?

Can anyone please help me with that? Suppose my list name is: Country in which I created 5 folders with different country names, then inside that folder I created their state names. So scenario is ...
1
vote
1answer
94 views

Try to download multiple files from SharePoint library on Button click

I am trying to download multiple files from SharePoint library by clicking on Download All button. The image is given below: How can I download all files from SharePoint library on a single click on ...
0
votes
0answers
15 views

Opening Calendar Event in Modal - Not Working in Chrome

I am using the following script to open 3events in a Calendar Web Part in a modal/pop up. It works in IE but not in Chrome and I have been unable to modify it to work in both browsers. Any help is ...
0
votes
0answers
22 views

Color Coded Columns in SharePoint 2013 classic view

I am trying to create a custom list that has custom color coding that is dependent on what the choice field values. I have tried to save my JavaScript file to my site assets and master pages of the ...
0
votes
1answer
25 views

SharePoint Online - Search API call using filters

I am trying to call SharePoint search API through JavaScript but cannot get it working. I need to get all documents in a SharePoint site where Title='Test'. I am using SharePoint online. Can someone ...
1
vote
1answer
65 views

Indexed column throws threshold error while filtering based on range

We have a list with over 1M items. The end goal is to filter the column InvDate based on date range. The InvDate is an indexed single line of text column , However it throws the List View Threshold ...
0
votes
1answer
63 views

Form Digest expires while copying 1M List Items

We are copying more than 1M+ list items with 27 columns from List A to B. Got to the point where all the items are fetched from List A. The code throws form digest error after copying around 2K Items. ...

1
2 3 4 5
107