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

How to check if user belongs to a sharepoint AD group nested within a SPO group using REST/Javascript only?

I need to know if a user belongs to a specific SPO group using REST/Javascript. If the user has been added individually I can but if the user has been added to that SPO group via an AD group I can't ...
0
votes
0answers
13 views

Custom List - Hide 'Settings' on Form Web Parts

I need to be able to hide the ‘Settings’ cog, from everyone other than the site Super Users, on the New & Edit forms of a specific Custom List. My Javascript skills aren’t great, but a colleague ...
1
vote
0answers
53 views

OData query to get a field values by column position in the list

So I want an OData query that allows me to get the field and its values by position in the viewable list. In the above picture, for example, I want the values in the "Title" column but that ...
0
votes
0answers
23 views

Download file from SP in custom web part without <a></a> tag

I have a custom web part it needs to download a file from SharePoint document lib. I was using the tag combined with the file path, but this seems to break SharePoint. Is there another way to do it? ...
1
vote
0answers
105 views

409 'Conflict' Changing ContentType property of Document Library

I have about 600 items in a document library. The library has 9 content types defined in it, which is part of a reorganization to take items out of folders and make it folderless. The library is a ...
1
vote
0answers
37 views

Sharepoint 2019 - modify search result item template to return Office URI Schemes

I am looking for a way to open word, excel, ppt files in a local client application. For any mysterious reasons that work in document libraries but not in search results. I know that it works if I ...
0
votes
0answers
21 views

Adding Dynamic value to the table data in sharepoint framework

I am adding dynamic data to the table through graph api call into the webpart except in the Assigned To table heading I want to fetch the value for Assigned To through another graph api call How can i ...
0
votes
1answer
64 views

Custom action button enable/disable

I want to enable or disable custom Action button on following condition. When user select list items in the list and if the user (created by) is particular user Group then I want to disable the Button....
0
votes
0answers
27 views

Link shown in SP.ModalWindow is opening in a new tab

I am opening in a modal window a link to 'Manage my alerts', so the users don't need to go to a list, to handle their alerts. However, when the alerts are displayed in the modal window, if user clicks ...
0
votes
0answers
34 views

Check logged in user and selected item Created by is same

I want to enable customaction button depending on the condition if the current user is same as the selected list item Created by. How can do this Javascript ?.
0
votes
1answer
23 views

Returning REST response to calling function

Is it possible to return the value from a REST response back to the calling function? In the code below returneddata is always undefined. In the GetMyData function I can see the REST response and ...
1
vote
1answer
253 views

Get a URL from a SharePoint List item and convert it to base64 using JavaScript

I have a list with 2 columns namely DistributorLogo and BaseURL as shown below. The Distributor logo column contains an image URL I am trying to get the image URL from the DistributorLogo column and ...
0
votes
1answer
584 views

How to update list item using id in Sharepoint 2016 using rest api

I have two lists 'a' and 'b' with same titles but different ids. I retrieve the title from 'a' list to a html page. And, there is a 'b' list. Here, both the lists have different ids but has same ...
0
votes
1answer
30 views

Unable to store the list item value using session storage in Sharepoint 2016

I click on a link then it's updating the count column value in the list. But after reloading the site, the count column value becomes 0 in the list. I am updating the count value using count variable ...
1
vote
1answer
93 views

Unable to update the list item in list using REST API Sharepoint 2016

I've been working with this problem from one month but unable to solve this. I'm able to retrieve the list using GET method REST API. But I'm not able to update the items in the list using POST method ...
0
votes
0answers
17 views

Add query string to url so that it can show the planner task pop up form

we have created webpart in sharepoint SPFX with react framework and fetch data using graph API From this webpart we want to redirect to planner task's popform This is the Planner Task PopUp form I ...
0
votes
1answer
28 views

Unable to match a subtasks to its parent tasks REST API

I am able to get the tasks and subtasks from a SharePoint list using the REST API. How can I match a subtask with its parent task? The following JS inside an AngularJS controller returns two lists, ...
0
votes
2answers
130 views

Clarity on EffectiveBasePermissions object

I recently used some code I found on this site to help resolve a problem. It worked with no issues. The one thing that is bugging me though is there is a portion of code I do not quite understand ...
0
votes
0answers
52 views

Re-creating Resource Planning Tool in SharePoint

I've been tasked with re-creating the attached spreadsheet image in SharePoint, and I'm kind of stuck on where to start. Basically, I need a way to add an employee to a list, attach multiple projects ...
0
votes
1answer
29 views

Set List Item Default to Edit Form

We are using some Javascript customizations for SharePoint list items. My boss does not like the fact that we have three forms to choose from (edit, new, and display) and wants the user to be able to ...
1
vote
3answers
300 views

Make html page with Sharepoint REST result

I'm new with javascript and HTML, so please be patient. I'm trying to make very simple HTML page displaying text with value stored in sharepoint 2013 list. I've made REST query in which I've item with ...
0
votes
1answer
21 views

SharePoint querystring acting abnormal

I am using REST API to read items from a list and display it on a page in a table. I added an extra column and added an edit link which will take the user to another page and passing the id of the ...
0
votes
1answer
76 views

Fetching the data through Graph API in the webpart using sharepoint framework

[I am trying to fetch my email messages through Graph API into the webpart in sharepoint framework] In the webpart Not getting the details of my emails through Graph API Error : Cannot read property ...
0
votes
1answer
40 views

Jquery not working on dialog box from list view

I am attempting to use some DOM manipulation to change list column names on a list Display view. However when I use Jquery to create the array I get a null value. My test site has the Dialogs setting ...
0
votes
2answers
130 views

SharePoint SPFX Webpart, Create a callable function that gets user information from the Graph API

My organization is currently using the https://github.com/pnp/sp-dev-fx-webparts (React-Script-Editor) webpart on several of our SharePoint online site collections to enable the functionality we had ...
0
votes
0answers
17 views

Delegate functions in Async queries in Sharepoint

I have an HTML page that is embedded as a webpart in Sharepoint (on-prem). The page consists of a list of Categories and for every category , a list of Requests. e.g 1. Category Name: "Cat 1&...
0
votes
0answers
44 views

People Picker Field in Edit Form not getting updated

I have a Edit Form created for the List using SharePoint designer. In the Edit Form, when I update my People picker field and click on save button it doesn't save my changes. Solution in the below ...
0
votes
2answers
153 views

Node.appendChild Error [closed]

When I retrieve items from my list using REST API, I generate rows to an html table but when I try to append it to a table, I get the following errors: Uncaught TypeError: Node.appendChild: Argument 1 ...
0
votes
1answer
35 views

How to redirect from a TaskList to a sitepage in sharepoint Spfx

This is my Task list, how to redirect to any Site page on the click of the Task Name field? When we are clicking on any Task Name field's value, the default form is opening as shown below: Instead ...
0
votes
2answers
79 views

REST API data.d.results property error

I am trying to loop through my SharePoint list items retrieved using REST API but I get the following error: Uncaught TypeError: Cannot read property 'ID' of undefined function onQuerySucceeded(data)...
0
votes
1answer
46 views

How to get the number of clicks on a list item in SharePoint 2013 using REST API JavaScript?

I am new to SharePoint and using 2013 classic version. I have created a website and in it, it has list with items. So, I need to trace the number of clicks of each item individually. My code is not ...
0
votes
0answers
23 views

Editing (Modern Experience) Site Page Through JavaScript Using Page JSON Data

I have a web application that I want to edit/update the home.aspx page (in Site Pages doc lib), namely inserting anchor elements to instances of agendas for meetings. I already have the agenda meeting ...
0
votes
0answers
73 views

SharePoint multiline view-column formatting to create chat

I'm building a SharePoint project using SPFx and PnPJS. In my SharePoint list I created a multiline field. And in the column formatting section I added this snippet here: https://raw.githubusercontent....
1
vote
2answers
34 views

Simple Modal SP Online (2013) - not working

<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial, Helvetica, sans-serif;} /* The Modal (...
0
votes
2answers
64 views

Select all checkboxes depending on parent checkbox in SharePoint server 2016 on premise

I have a document library in SharePoint 2016 on-prem. The document library has a content type with columns that the user needs to complete when the user uploads a document. Since you cannot edit the ...
0
votes
1answer
41 views

Tree-hierarchy for 3 sharepoint lists using the https://gijgo.com/tree .. any help please

I have the below 3 SharePoint lists, and using the REST APIs i am getting the data as follow:- 1- List named named "Department", here is the json for the items "value":[ {"...
2
votes
2answers
248 views

How to get the Alternative text for "Hyperlink or Picture" field Type in SharePoint online

I have a field in my SharePoint list of type Hyperlink. I want to format the list view so that all the items in it will display as bullet items. I am using JSLink and below is my code. I want the DOM ...
0
votes
1answer
17 views

Collect the latest Modified and Modified By info for each user that has contributed to a list. Javascript?

A customer has asked me to display a table that shows everyone who has modified a list and the most recent modification they each made. It would look like: Sally Modified 3 hours ago Jack Modified 4 ...
1
vote
1answer
27 views

Relative URL or using _spPageContextInfo

For some reason, relative URLs are not working OR I am using the wrong syntax. I have tried the following with no luck on my CEWP HTML page. <script src="/jslib/jquery351/jquery351.min.js&...
1
vote
1answer
42 views

SPServices is not working in one environment and working in one SharePoint environment/

We deployed solution in one SharePoint server, and uploaded the js file after solution deployed. we are getting the following errors on debugging JS. SCRIPT438: Object doesn't support property or ...
2
votes
2answers
150 views

Google Organization Chart from SharePoint list items

I created a Google Organization Chart on SharePoint using the answer from the following question on Stack Overflow. https://stackoverflow.com/questions/33796219/organization-chart-from-sharepoint-list-...
0
votes
1answer
35 views

SharePoint Page Title Does Not Change

So I have created a bunch of SharePoint site pages where the title is just the SiteName.aspx in the Web Browser's title bar. By default, the SharePoint title also appears in the top left of the ...
2
votes
2answers
135 views

Not able to insert data into TaskList In sharepoint Spfx

Using SP-Pnp-Js Library, I am not able to insert data from a webpart into the sharepoint Tasklist. private SubmitWorkflowForm(): void { var TaskNameVal = document.getElementById('taskName')['value']; ...
0
votes
1answer
54 views

Picture Slideshow Web Part image size too small if page contains multiple picture slidershow web parts on same page

I want to show full size picture in slideshow web part in SharePoint 2010. but SharePoint shows images from /_w folder of picture library which are not original and full size images. I have found very ...
2
votes
2answers
294 views

SharePoint Online JavaScript creates folder instead of document set

We have a SharePoint Online system with 4 custom new forms created with Html/JavaScript. These forms used to create document sets and worked very well for a year (the forms are for different document ...
1
vote
1answer
621 views

Retrieving "CanvasContent1" in JSON format

I'm trying to build my knowledge of SharePoint Restful API so that we can ultimately script bulk updates to pages. Something I don't understand is why the "CanvasContent1" column is being ...
0
votes
1answer
40 views

Add SharePoint page name in a webpart

I've made a HTML + CSS menu on a page which I happy with. Ideally I wanted the name of the page to appear in it. This way I can use the web part across the site and it will change the page name itself....
0
votes
3answers
75 views

How to update a multiple lookup field in SharePoint Designer 2013 (REST API)

I would like to update a multiple lookup field in SharePoint Designer 2013. OOTB this is not possible. In SharePoint Designer 2010 it was possible. Now I would like to do this with for example a REST ...
0
votes
2answers
164 views

Use Rest API to return link from sharepoint list

I'm trying to use REST API in SharePoint to getlistitems to display the link from a hyperlink field from my sharepoint list. I AM successfully using the code to display the title field - but NOT the ...
0
votes
2answers
52 views

D3 is not rendering in CEWP (SP2013)

I am trying to learn D3 for use with REST endpoints (eventually). At the moment all I am trying to do is get D3 to render anything for learning purposes. The code below shows the d3 object loaded when ...