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
10 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
17 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
13 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
25 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
17 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
13 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
22 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 ...
  • 107
0 votes
2 answers
33 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
23 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
30 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 ...
  • 1
1 vote
1 answer
21 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,122
1 vote
1 answer
18 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
31 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
17 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
20 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
23 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
30 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
44 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
20 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
32 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
0 votes
0 answers
46 views

Pass file array buffer to Server side object model(C#)

I used following client side JavaScript method to get local file into array buffer. I would like to pass the "arraybuffer" to Web method which contains SharePoint Server side object model(C#)...
1 vote
0 answers
14 views

Populating field value from another list with JavaScript doesn't work

I have a list called 'quotes' and list called 'autoquotenumber'. 'autoquotenumber' only has one item id=1 which is used to keep track of the quote numbers. I would like to retrieve a column from '...
  • 13
1 vote
1 answer
26 views

Adding List item without user info (anonymously) for authenticated users in SP Online using JS

We have a SharePoint online site with organization only access. We have set of users who will be submitting a survey/feedback which needs to be added to list without user info (anonymously) to follow ...
  • 3,596
0 votes
0 answers
14 views

User with Full Control access to a site collection is not able to add users to group (System.UnauthorizedAccessException)

I am a Site collection admin and I am able to add users to groups via Rest API. But another user who isn't an admin, but has 'Full Control' access tries, he gets this "Access denied" message....
0 votes
0 answers
21 views

AngularJS assertion failure on SharePoint React Script Editor Webpart SPFx Webpart

I have a SharePoint 2013 application which consists of AngularJS customized application aspx pages. The application works perfectly fine on SP13. But now the requirement is to move to SPO Modern Teams ...
0 votes
1 answer
144 views

Getting "Uncaught TypeError: Cannot read properties of undefined (reading 'href')" error on SharePoint 2010 form load

When opening a SharePoint 2010 form in modal mode I get the following error: Uncaught TypeError: Cannot read properties of undefined (reading 'href') See code below for usage and troubleshooting. $(...
0 votes
2 answers
154 views

Fluentui Grid not working in SPFx work bench and also as an installed app

i want to use the fluentui grid layout in the SPFx Webpart with React as Framework. the problem is that the grid is not working. As soon as i use it, it shows only the items under each other. how I ...
1 vote
1 answer
37 views

Hide Multiple Choice field with jQuery

I have a field in an SP 2016 form that looks like this: I'm trying to hide the row that the multi choice field is in. I've tried multiple things. #1 doesn't work at all. #2 hides the check boxes but ...
  • 23
0 votes
0 answers
31 views

SharePoint cannot get Access Token outside postman?

I need to get access token from SharePoint, In order to upload some files! I got access token from postman successfully, But when I try to do the same request with Javascript! const generateToken = ...
0 votes
0 answers
22 views

Javascript: Correct Syntax to find if string exists in Array

In the DO..WHILE loop I need to extract 5000 items from a list (LookupList) and create a new list (arrayAll). I need to extract 5000 at a time as SharePoint has a limitation of 5000 items. I need help ...
  • 101
0 votes
0 answers
14 views

SharePoint 2013 - how to create a button that on click loads a modal with a second list pre-filtered where ID=@ID

Anyone have a script or function that would allow a on click to load a second sharepoint list into a modal pre-filtered based on current item's ID?
1 vote
0 answers
69 views

Plotting of list data using pyscript

I have SharePoint 2013 and 2016 environments that I like to add some plots for some custom lists (webapp part) of SharePoint. I thought of using pyscript but I couldn't go too much further as I can't ...
  • 111
1 vote
1 answer
69 views

How to combine two SharePoint columns into one datatable column?

I have a datatable that I want to show the information from my SharePoint List. The table has three headers: Name, Department and Address. The Address column should combine two SharePoint columns(...
  • 11
0 votes
0 answers
13 views

SharePoint 2016 - I found code to embed hyperlinks to Month/Week/Day calendar view, but can I embed hyperlinks to my modified Current Views?

I have set up different Calendar overlays to group different types of events, and I would like to create hyperlinks above the calendar so that users can jump between the views (All Items, Meetings, ...
  • 1
0 votes
0 answers
31 views

Try to generate unique ID

I have 4 to 5 dropdown fields and i have try generate unique id. For example:- In below image i have 4 fields. The series for the Unique ID( 1st four alphabet of each selected value) = Company + ...
  • 45
0 votes
1 answer
14 views

Add code based validation to InfoPath forms for Sharepoint

I have a list where I use Infopath Forms. Users use these forms to enter data. They should also attach something in the form, but if they don't attach anything and click save, I want that the item is ...
  • 101
0 votes
0 answers
32 views

SharePoint 2016 Calendar - Can you send a SharePoint Calendar event via Outlook? Even without any mapping of the SharePoint calendar?

So what I would like to do, from within a 2016 SharePoint Calendar, is to double-click a calendar event and click some kind of button that then opens up a meeting event in my Outlook, with all of the ...
  • 25
0 votes
0 answers
20 views

SharePoint 2016 - Is it possible to have a recurring Calendar event and be able to Edit aspects of an individual event of its recurrence?

Okay, so I am going to try and explain my intention in case someone knows of a better way to achieve my desired end result ... So I want to use calendar overlays, each with their own color based on ...
  • 25
1 vote
1 answer
55 views

SharePoint 2016 - I have code to open Calendar events into a modal popup window, but how would I tweak code to have the popup open in Edit by default?

So I found the below code, from the below link, which allows SharePoint calendar events to be opened in a modal pop-up view rather than loaded into a new page, but would it be possible to tweak the ...
  • 25
0 votes
0 answers
12 views

Setting a field with predetermined values in a loop (child records) using map and arrays

I have a parent list (Product Catalog) and a child list (Approvers). When a parent record is created I need to create 4 child records each with a predetermined user id in the approver field in the ...
0 votes
0 answers
18 views

Display Calendar Reoccurring Events as separate line items

Here is the scenario - I have a SharePoint calendar in 2019. When using calendar reoccurring events the event enters in the list as one line item with reoccurrence. What I am looking for is for the ...
0 votes
1 answer
395 views

Conditional URL with ternary operator in a href tag in JavaScript

Can anyone help me in writing ternary operator in JavaScript in below line if href is empty set data.d.results[i].EncodedAbsUrl else data.d.results[i].ServerRedirectedEmbedUrl listItemInfo += "&...
  • 43
0 votes
1 answer
341 views

Get Image URL in SharePoint document library

I have the below code which allows me to get all type of document URL for SharePoint which can be opened from link but there are images when trying to open it load the same page here is a format for ...
  • 43
0 votes
0 answers
17 views

How to display information in chart for sharepoint list?

I am trying to display information from a sharepoint list in a bar chart. The fields I use are LTIOV (date field) and RFI_nummer (text field). On the y-axis I want to have the RFI_nummer and on the x-...
  • 121
0 votes
2 answers
56 views

How to format results from rest api sharepoint jquery

I am using rest api to get results in below format but how shall append my result to get in desired format and on click document should open new tab my code function getListData() { var ...
  • 43
0 votes
1 answer
20 views

How to restrict items in query

I am trying to load the data from a sharepoint list: var requestUri = "/_api/web/Lists/GetByTitle('Request For Information')/items?$orderby=LTIOV"; This code doesn't return anything. Only ...
  • 121
1 vote
1 answer
2k views

Rest API Add item to sharepoint list - Cannot convert a primitive value to the expected type 'Edm.String'. See the inner exception for more details

I have this Rest API to add an item to a SharePoint list in SP 2016 on premise. I am passing information to it from global variables that get set in other APIs. The error I'm getting is: {"...
  • 23
0 votes
1 answer
33 views

How to get right information from barChart

I am using the below code to create a barchart in sharepoint. The code is working but doesn't return the right information. The field "Reply" can contain three values: Nill Reply, Partly ...
  • 121
0 votes
1 answer
92 views

how to fix Javascript function error saying expected ';'?

I use below code to create a Barchart on my sharepoint page. I checked the code online and all is fine, still while running it says ";" expected at ---> let barchart = new Chart("...
  • 121
0 votes
1 answer
17 views

Unable to get property 'LTIOV' of undefined or null reference

I am using this code to retrieve data from my sharepoint list. Regardless of my Null check I still get the error saying unable to get property or null reference. $.ajax({ url: ...
  • 121

1
2 3 4 5
107