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
0 answers
4 views

How to upload Large files using node.js and spsave

I have implemented multiple file uploads using spsave. But whenever i try to upload larger file(5mb+) files are not getting uploaded. const apiRequest = spsave(coreOptions, creds, fileOptions); ...
0 votes
0 answers
15 views

Searching for specific text in html code of SharePoint Online page

On a SharePoint online modern site, I need a JS variable to search for a specific string of text in the code of the page (this variable is for Google Tag Manager). I have tried: function() { var ...
1 vote
1 answer
18 views

A type named ... could not be resolved by the model - but code is fine

I am trying to add an item to a SharePoint list synchronously. but I get the error "A type named 'SP.Data.QAReadAndSignListItem' could not be resolved by the model. When a model is available, ...
0 votes
0 answers
21 views

The name of the Site Collection does not appear in the service query

Could you help me please, I try to understand, why the site collection doesn't appear in my service query? This way, I get an error: This is my service to get data from list: export class ...
  • 21
0 votes
0 answers
8 views

Changing the name of a document by adding ID to it in js

I hope you can help me. When uploading a document to a document library, I try to change the name and pass values I selected before. Say the current name + the ID of the document. However, I am not ...
1 vote
1 answer
15 views

How to set data in custom Web Property SharePoint online?

Could you help me please, how can I set a value to custom web property in SharePoint and then get this property later? Now, I only can get all default properties using [web url]/_api/web.
  • 21
0 votes
0 answers
13 views

SharePoint Online JavaScript executequeryasync callback not fired

Can someone help me? I tried to write an add-in. The add-in contains 2 pages (default and init), a JS module and add a button to the documentlist part. When user selects a folder and clicks the button,...
0 votes
1 answer
32 views

how to get data from responseJSON

I am trying below code but always get undefined in console for console.log(responseJSON.Title); this.props.context.spHttpClient.get(`https://someazuresite.azurewebsites.net/api`, SPHttpClient....
  • 119
1 vote
0 answers
52 views

How to create several files with addUsingPath in a batch?

I'm trying to use pnp/js to create a batched web and add new files to a folder with addUsingPath with this code: const sp: SPFI = spfi().using(SPBrowser({ baseUrl: options.baseUrl })) const [...
0 votes
0 answers
30 views

JavaScript dropdown select redirect and localStorage clear

I have spfx extension with dropdown selection on the top placeholder which it navigates between sites so when navigating between the sites I would like clear localStorage which it clears while ...
0 votes
2 answers
45 views

How to build a CAML query from a string of data in JavaScript?

I have a string 'listOfUsers' which is in the format user1;user2;user3;user4;user5;user6; This string could have any number of users. I would like to build a CAML query which will find all those users....
0 votes
0 answers
24 views

Get users properties from displayname of user using javascript

I need to get user properties such as email, id, account name, department, and job title using JavaScript. I can successfully pull someone's display name from a people picker field, however, trying to ...
0 votes
1 answer
16 views

How to use JavaScript to conditionally format a grouped view of a SP13 list

I have found examples that allow for highlighting a row based on date, I need to also highlight the 2 group tabs above that row example Group(highlight red if any row in group meets condition) ...
  • 1
0 votes
0 answers
14 views

How to copy select fields from existing list item to new list item using JavaScript Object Model in SP

I want to copy one item from a list (source) with some of its fields to an identical list (i.e. has the same fields) on another SharePoint site (destination). I've got this far with the code that ...
0 votes
1 answer
22 views

How can I active QuickEdit with Javascript?

we're customizing a lot of customers sharepoint sites and we need to turn on/off QuickEdit multiple times, I want to create a Bookmarklet to achieve this, but the setting can't be found. I've tried by ...
  • 1
0 votes
1 answer
26 views

Disable dropdown selection in newform aspx

I have below code which hide the dropdown but I want to disable it or greyout the selection <script src="https://code.jquery.com/jquery-3.3.1.js" type="text/javascript"></...
  • 119
0 votes
1 answer
42 views

How to update managed metadata column with multiple values using JSOM

I'm using JSOM to update a managed metadata column (in SharePoint 2016) using term GUID like this: ... var oListItem = collListItem.itemAt(i) oListItem.set_item('SPSBaranID', theTermGUID) oListItem....
  • 1
1 vote
1 answer
63 views

Javascript not working in SharePoint Online

I use the SharePoint Online Modern Experience. I am trying to run Javascript in my sharepoint online page but it will not run. It runs on my computer however and correctly displays the resultant page. ...
0 votes
1 answer
36 views

How to save bulk records in SharePoint List using JSOM

I have weird issue saving multiple records to SharePoint List via JSOM using below code where sometimes most of the records were saved and sometimes were not. Is there any best practice to save ...
  • 723
1 vote
2 answers
91 views

Custom Page in SharePoint Online

I would like create a custom page in the SPO using SPA with HTML,CSS and JS. I was not able to find a way to start with I want complete page or Full Page. I want create like webpage with responsive to ...
0 votes
0 answers
23 views

SharePoint: UserProfileLookup(UserName,"PictureURL") to link to another field to display the user profile picture

I am developing a search page for staff biographies in my company. I am using a formula "UserProfileLookup(UserName,"PictureURL") in a calculated field in SharePoint. I got the User ...
0 votes
0 answers
24 views

Color code rows of SharePoint 2019 list with multiple pages in classic view

I have a long status list in SharePoint 2019 that has the following CSS for color coding rows: How do I get this to work on all the multiple pages vs just the first page of the list. Can the code be ...
1 vote
1 answer
192 views

How do I pass HTML table inside mailto in anchor tag?

I am creating a web part in SharePoint Online using SPFx REACT framework and I want to open an email pop up with an HTML table in the body section of the email. Currently, I am using mailto to open an ...
0 votes
0 answers
15 views

List of choices in field 2 depends on selection of field 1

In SharePoint native form, I would like to develop a JavaScript as a web part in the form page (New / Modify) In field_1 I have choices between "Animal", "Vegetable" In field_2 I ...
0 votes
0 answers
35 views

401 Unauthorize error when making POST requests

I'm using SharePoint's REST APIs to build a simple application that displays all items of a list and includes a form to create a new list item. All users are able to view the items, but only a few ...
  • 111
0 votes
0 answers
10 views

Document set in SharePoint : How to control documents adding

I have a document set in SharePoint (with attributes of : Name, Date of validation, Status) and I would like to prevent a user from adding documents inside of this document set when its status is ...
0 votes
0 answers
22 views

get_lookupValue not working on sharpeoint online

I am able to pull sharepoint online list items by following this article https://social.technet.microsoft.com/wiki/contents/articles/37536.sharepoint-online-retrieve-list-items-from-sharepoint-list-...
  • 49
0 votes
0 answers
56 views

SharePoint List Item - Popup

I need to develop a popup which will take text from SharePoint list item, kindly support. I have tried modal popup window on page load, but our management needs to fetch the text from SharePoint List.
0 votes
0 answers
19 views

Event Listeners for SharePoint Navigation Bar?

So I encountered a bug where the navigation bar of the sharepoint webpage is interfering with custom made menu bar in React, which is made to replace the stock quick launch. It works perfectly fine ...
0 votes
1 answer
34 views

How to trigger a creation of a SharePoint Online site collection with the creation of a new user in Keycloak

I need to know how I can trigger the creation of a new SharePoint Online site collection with an external identity provider in my case KeyCloak. As soon as a new user has been created and a certain ...
0 votes
0 answers
19 views

How to create a daily report from a custom list when date equals [today]?

I have a custom list with a date field. I have a view for the list that equals [Today]. There are about 10 individual line items that equal [Today] per day. I want to create a report but not using ...
1 vote
1 answer
23 views

Help passing list item ID

I'm currently using a script to display calendar events with some added styling. It's originally from: Display Calendar Events From SharePoint Calendar Lists Using Rest API I'm running into an issue ...
  • 11
0 votes
0 answers
117 views

using Moment react in an array and then format Date

i want to format a Date (StartDate and EndDate) in Moment React. Unfortunately, it's always giving me an error message. Maybe you can help me! Here is my code so far: this.state.ProjectFilterItem....
0 votes
1 answer
55 views

Call a function dependent on the value inside an array with SPFx and react

I coded a template that pushes values from a SharePoint List into an array. I want to change the image inside the array depending on a value that is inside an array. The value should function like a ...
0 votes
1 answer
45 views

Trying to check if user filled out survey. Getting an error in a SharePoint 2013 Survey

Edit: Just realized the Survey is set to anonymous. So I'm assuming you can't check the author? I'm trying to check if a user has filled out a SharePoint survey. I've found a few questions on it and ...
  • 31
0 votes
1 answer
51 views

Running modern 2022 native Web Components in Microsoft365/SharePoint Online

I am an old CEWP user. Haven't used SharePoint in years. For a new Online project I have been asked to explore if my team (some 50+ autistic people with distance to the labor market) can work on a ...
0 votes
1 answer
366 views

Filter Query with Rest API (Internal Name or New Name)

I am making a fetch to retrieve information from a SharePoint list that meet a certain criteria. I need the EndDate to be greater than or equal to todays date. I also need to other columns to equal a ...
  • 113
0 votes
2 answers
113 views

How to call Azure Functions App from SharePoint Online as the signed-in User (via Client-side JavaScript)?

I have an Azure Functions App (with HTTP API endpoint) which, upon triggered, needs to know the EMAIL ADDRESS of the caller; calling via the client-side (SPFx) JavaScript on the SharePoint Online Site....
0 votes
1 answer
226 views

How to call a JavaScript function defined on the page from within an SPFx webpart

Updated: I created a basic SPFx webpart using "yo @microsoft/sharepoint", etc. with typescript version 4.5.5. There are JavaScript functions that are global in the page scope. I need to be ...
0 votes
1 answer
106 views

Slack in Sharepoint Online

I want to integrate opening Slack in Sharepoint Online. How can I add a webpart that will open Slack in the iframe and add a link to the group / channel in the path, which will be taken from the ...
  • 21
1 vote
1 answer
44 views

Looking for a sample SPFX webpart (No JS Framework) with paging and styling with traditional CSS

I just need some ideas here... I want to build a webpart with No JS Framework selected(meaning I want to use vanilla JS) But I would like to use the get property configuration pane to So a user can ...
  • 4,164
1 vote
1 answer
33 views

Upload Attachments on SP CUSTOM list

I'm using HTML to create a custom list with bootstrap and then JSOM to manipulate and display the list on a SP custom list. I am looking to add attachments and I can't figure it out. Can anyone help? ...
  • 11
-1 votes
2 answers
36 views

Stop users from directly accessing and using OOTB Lists

There are two type of Users on my Site. Power Users and Normal Users. I want the Power Users to have access to the OOTB Lists and they can do whatever they want with those List and List Items. However ...
0 votes
0 answers
39 views

Get DateTime value from modified column with ajax call

I am wondering if it is possible to get value of modified column (datetime) if user try to edit item in SharePoint 2013 (maybe with javascript ajax call ?!) I am trying to get value from specific item ...
0 votes
0 answers
47 views

Unable to load external scripts when user navigating between pages with sharepoint extension

We have sharepoint extension which load js files on page load/refresh working properly however when user navigate between news feed pages partial loading script does not work.Even I have used ...
  • 11
0 votes
1 answer
30 views

Getting Sharepoint URL using JS in a Survey

I am trying to capture the sharepoint page user was on when the click on a Qualtrics Survey. However, using 'document.referrer', i am only able get the part of the URL (.sharepoint.com) instead of ...
1 vote
1 answer
123 views

SPClientPeoplePicker.SPClientPeoplePickerDict ProcessedUserList DisplayName values

I've used this code (found on this site) to access a people picker field in SP2016: var peoplePickerID = "field title"; var clientPeoplePicker = SPClientPeoplePicker....
  • 21
0 votes
2 answers
108 views

update list item with presaveaction function

can anyone help me out with the code below. I'm attempting to update a list item on save. I believe I would do this with the presaveaction function. Can you please tell me where I'm going wrong. I'...
  • 13
0 votes
0 answers
32 views

function presave action to update item

I'm attempting to update a list item upon clicking save on my newform. I think I'm close, but perhaps not as I'm really new to this. My wheels have been spinning for a few days. I am attempting to ...
  • 13
0 votes
1 answer
57 views

clientContext.load not retrieving some columns

I am attempting to retrieve the columns from a single item. For whatever reason I am having troubles getting 2 columns from my list. columns (last and next) request failed Column 'Last' does not ...
  • 13

1
2 3 4 5
108