As of May 31, 2023, we have updated our Code of Conduct.

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

Spfx NoJS framework question with using plugin

I'm working on a spfx webpart and using NoJS for it. The webpart is an imageslider with carousel. I'm going to be using the plugin here The plugin is FancyApps The issue is how to bind the plugin ...
naijacoder's user avatar
  • 4,172
0 votes
0 answers
12 views

Trying to ecapsulate CRUD functions for REST API in a custom class, but I keep getting a 403 error even with permissions verified and request header

As my title says, I am building a custom class to easily read and update items from a sharepoint list to an ASPX page. Reading is fine, it shows up as expected. But when I try to update a specific ...
McIntireTB's user avatar
1 vote
1 answer
16 views

SharePoint Online Display All Options in a Choice Field In A Custom Page

Is there a way to fetch all the Choice Options of a Choice Field created in a SharePoint Online List and to display in a custom SharePoint Page(Inside Pages Library/Site Pages)?(Without the help of ...
Aparna Sunil's user avatar
0 votes
0 answers
9 views

Setting input value in modern experience with javascript

I'm trying to automate the adding of a list entry in sharepoint online lists with modern UI and plain JS. Setting the value works fine using: // Stolen from StackOverflow ;) const inputTypes = [ ...
MsListsAutomator's user avatar
0 votes
0 answers
18 views

Remove javascript when user navigates to a different subsite

I have an app that loads in JavaScript and CSS files when it initializes; when the user navigates to a different subsite that has different files to load in, the app triggers again and loads in the ...
karma n effect's user avatar
0 votes
1 answer
59 views

LivePersona control doesn't work

I did everything according to the pnp documentation (https://pnp.github.io/sp-dev-fx-controls-react/controls/LivePersona/#livepersona-control), but the LivePersona control does not work for me. Photo ...
Propool's user avatar
  • 37
0 votes
1 answer
46 views

How to add header to graph pnpjs

I tried to get all users from Azure AD with Hire date > 2012-12-31T23:59:59. return graph.users .select("givenName", "surname", "employeeHireDate", "id"...
Propool's user avatar
  • 37
1 vote
2 answers
25 views

Anniversaries webpart using Azure AD

I've a custom webpart Anniversaries, which get data from list. This is my service to get data from list: public get(listName: string, startDate: Date, AnniversariesNumberOfItemsToDisplay: number): ...
Propool's user avatar
  • 37
0 votes
0 answers
10 views

How to highlight multiselect field in SharePoint 2019 using javascript

Since migrating to SP 2019 I can no longer use calculated fields to create highlighted fields and have now turned to JavaScript to accomplish the same thing. <style> .greenSymbol { height: ...
James's user avatar
  • 1
1 vote
1 answer
58 views

Trying to encode Special keywords from Value in react

I am trying to filter the special keyword value from SharePoint list. Filter query doesn't work when filter the value. I am applying the encodeURIComponent solution for encode the special keyword. But ...
Shreya's user avatar
  • 55
0 votes
1 answer
82 views

web part new version not always loading

I ran into a problem, after installing a new version of the webpart with changes, it does not always load on the site. Through time the old and new are loaded. I incremented the package versions. A ...
Propool's user avatar
  • 37
0 votes
1 answer
97 views

How to upload Large files using node.js and spsave module

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); ...
Akhil Mekkatt's user avatar
0 votes
1 answer
35 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 ...
dominique's user avatar
1 vote
1 answer
56 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, ...
Naama Frank's user avatar
0 votes
0 answers
29 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 ...
Propool's user avatar
  • 37
0 votes
0 answers
9 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 ...
Hasenstern's user avatar
1 vote
1 answer
23 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.
Propool's user avatar
  • 37
0 votes
0 answers
19 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,...
LucVallot's user avatar
0 votes
1 answer
129 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....
kumar's user avatar
  • 129
1 vote
1 answer
122 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 [...
Angelo Selvini's user avatar
0 votes
0 answers
48 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 ...
striker92's user avatar
0 votes
2 answers
84 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....
Pete Whelan's user avatar
0 votes
0 answers
75 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 ...
Ghoztrider's user avatar
0 votes
1 answer
18 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) ...
James's user avatar
  • 1
0 votes
0 answers
33 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 ...
Laetitia's user avatar
0 votes
1 answer
25 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 ...
andrey's user avatar
  • 1
0 votes
1 answer
38 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"></...
kumar's user avatar
  • 129
0 votes
1 answer
50 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....
KDM's user avatar
  • 1
1 vote
1 answer
145 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. ...
John Doe's user avatar
0 votes
1 answer
52 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 ...
BizApps's user avatar
  • 723
1 vote
2 answers
183 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 ...
striker92's user avatar
0 votes
0 answers
36 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 ...
Srivatsan's user avatar
0 votes
0 answers
29 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 ...
user95039's user avatar
1 vote
1 answer
505 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 ...
user20815589's user avatar
0 votes
0 answers
16 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 ...
user106329's user avatar
0 votes
0 answers
40 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 ...
Paul Vu's user avatar
  • 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 ...
user162014's user avatar
0 votes
0 answers
31 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-...
SPDev's user avatar
  • 49
0 votes
0 answers
73 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.
Mohammed Badruddin's user avatar
0 votes
0 answers
35 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 ...
wgell89's user avatar
0 votes
1 answer
49 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 ...
Matthias's user avatar
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 ...
SharePoint Lady's user avatar
1 vote
1 answer
25 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 ...
Robert's user avatar
  • 11
0 votes
0 answers
187 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....
Matthias's user avatar
0 votes
1 answer
75 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 ...
Matthias's user avatar
0 votes
1 answer
53 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 ...
LAL1982's user avatar
  • 31
0 votes
1 answer
64 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 ...
Danny '365CSI' Engelman's user avatar
0 votes
1 answer
952 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 ...
BeerusDev's user avatar
  • 113
0 votes
2 answers
172 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....
夏期劇場's user avatar
0 votes
1 answer
304 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 ...
Scott Byrge's user avatar

1
2 3 4 5
108