0
votes
1answer
16 views

client context with userproperties and a list

I am trying to use a client context and load in userproperties and a list in the same success method. However I am having a problem as I get an error saying my listitems are undefined. Here is my code ...
0
votes
1answer
46 views

How to get list id and item id?

I want to share document in page which does not have document library web part (hence I can't get renderCtx). I need to use this function: ...
1
vote
2answers
55 views

jQuery not working properly

In the editform.aspx of an item, I am trying to use jQuery to cause a pop up to go off anytime a field is changed (sort of silly, but once I get this to work, I plan on moving to doing more). However, ...
0
votes
0answers
19 views

Adding central site column to a list with JavaScript in SP 2013

I'm managing a site where several users (owners) can set up new websites. But there are some areas that they always have to change that I cannot apply to the template. So I programmed a small code ...
0
votes
1answer
35 views

How to validate parent list data while creating new child item

I am having a parent list and child list. Parent list (Contract) is having an Contract Num, Contract Amount, Start Date and End Date columns. Child list (Project) is having and Project Name, Parent ...
0
votes
1answer
62 views

Displaying list from another site collection, want items to open in a modal dialog

Here is the code I'm using. Keep in mind that I know practically nothing about javascript and borrowed the code from someone else. He hasn't had time to look at it yet. I'm just trying to modify it to ...
0
votes
1answer
31 views

2 client contexts using the same success method

Is there anyway to have 2 client contexts in the same success method like so var clientContext = SP.ClientContext.get_current(); var peopleManager = new ...
2
votes
2answers
98 views

How to retrieve all items from a list by javascript object model and store it to array

I'm new to JavaScript Object Model in SharePoint 2010 and want to get some idea of that. I wrote below code to get all list items of a SharePoint library. This works fine and return all items. But I ...
1
vote
1answer
26 views

Formatting the date after outputting from list

I have outputted a date type from a list of mine like so while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); ...
0
votes
1answer
32 views

query a calendar not working

I am trying to query a calendar where it only returns the next event(so the item in the calendar that is closest to todays date including todays date), but I am running into some issues. It is ...
0
votes
1answer
26 views

Getting the whole field instead of iterating through

var clientContext = new SP.ClientContext(siteUrl); var oList = clientContext.get_web().get_lists().getByTitle('Privacy Statements'); var camlQuery = new SP.CamlQuery(); ...
0
votes
0answers
20 views

get column from a list and put in an array

Is there anyway to get a whole column from a list and put it into an array like you would get a list item like so : var listItemEnumerator = collListItem.getEnumerator(); while ...
0
votes
1answer
59 views

SessionStorage caching when getting items from a list

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady); var listTitle = []; var listUrl = []; var listIsActive = []; var listOrder = []; function sharePointReady(){ var siteUrl = mysite; ...
1
vote
1answer
24 views

Adding an array to sessionstorage sharepoint list [duplicate]

while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); listTitle.push(oListItem.get_item('Title')); ...
0
votes
1answer
17 views

get whole item from list not just individual letter

I have this code var listTitle = []; var listUrl = []; var listItemEnumerator = collListItem.getEnumerator(); while (listItemEnumerator.moveNext()) { var oListItem = ...
1
vote
1answer
27 views

Output url from a list javascript

I have this code which gets the items from a list and outputs them in an alert, however with urls it inputs [object object]. How can I make it print out the URL or the description var siteUrl = ...
0
votes
2answers
29 views

I need to filter a list with a 'Time' column so that user can see his created items in the list when that day appears?

I need to filter a list with a 'Time' column, so that user can see his created items in the list when that day appears? It should be for an AMPM view , Day of the week and Which week's day of the ...
0
votes
1answer
152 views

Conditionally hide/require form column based on radio buttons

I'm sure it's been asked a million times, but after hours of searching and messing around I have been unable to find a solution...Hopefully someone here can help me? I have a SharePoint list that has ...
2
votes
2answers
117 views

Updating list items by JSOM

I am currently trying to migrate a list from one sharepoint to another. I did this a few months ago allready and there it worked not bad. But now I run into problems. The list is a discussion list. I ...
2
votes
2answers
121 views

Add list item returning empty result

Hi Sharepoint experts, I'm trying to add list item using jsom and succeeded but my code keeps adding empty list item first. function repeat(pattern, count) { if (count < 1) return ''; ...
0
votes
0answers
23 views

Web part not showing up in custom list

I'm trying to add HTML to a content editor web part. When I'm editing in the browser it shows up. When I go to the list page the web part is hidden. Does this have to do with the type of page a ...
0
votes
1answer
64 views

Create a library when an item on the list is created

I want to create a document library in o365, when an item is created on the list, but i cant get rid of the error: Unable to get property "apply" of undefined or null reference. Here is my code: ...
1
vote
1answer
144 views

SharePoint Foundation 2013 - Problem with loading sp.js and sp.runtime.js

I have problem with an order in which I am loading <script type="text/javascript" src="/_layouts/15/sp.js"></script> <script type="text/javascript" ...
0
votes
1answer
225 views

Lists with null columns not returned when retrieving custom lists with Caml query and Javascript

I am retrieving a list with caml query and Javascript. Everything works fine besides the fact that I have an image column and not all lists have that column populated: Here is a sample query I am ...
1
vote
1answer
1k views

Retrieving list items using Javascript and Caml query

Hi guys I'm new to SharePoint dev and working on a project to retrieve list items. I have followed the instructions from http://msdn.microsoft.com/en-us/library/office/ee539350(v=office.14).aspx and ...
3
votes
1answer
105 views

Get distinct values via mechanism used when clicking “Show Filter Choices” on a Sharepoint list using Javascript

As many other people on this site seem to need, I'd like to get an array (or equivalent) of the distinct values in a field for a list. The canonical way of doing this is to retrieve the entire field ...
0
votes
1answer
74 views

Sharepoint list to XML including the headings?

We store data regarding Scrum sprint retrospectives in a SharePoint list. I have to create a chart for visualizing this information (which is not part of this topic/problem), so I need to somehow ...
1
vote
1answer
148 views

Displaying Calculated Column hyperlinks as text in filter drop downs

I have a list which has employee IDs as a field. I then have a calculated column which takes this field and uses it to link to our company-wide employee directory. This means I can hide the employee ...
0
votes
1answer
77 views

Autopopulate sharepoint list field

Can anyone help me with auto populate of list field based on dropdown field. Like i have list A with field Location(dropdown field). It has 10 values like India, Australia, UK, US etc. If anyone ...
2
votes
3answers
100 views

SPServices is the Document Checked Out SP2010

I was wondering if anyone knew how to tell if an item has been checked in or out from SPServices? I am able to get all of the nodes but I do not see one which captures the checkout. Is there a way ...
2
votes
1answer
381 views

SharePoint 2013 sp.js Getting the column names of custom list

*Edit* I have figured out how come the data returned for the columns was showing the wrong labels. The issue occurs when the list columns are created using the quick edit mode, as it allows you to ...
1
vote
2answers
38 views

Custom List without CreatedBy / ModifiedBy through WebUI/SPD/Javascript

Is it possible to create a truely anonymous list without the created by and modified by columns defaulted, like if someone wanted a suggestion box? Specifically is it possible to do this in SP2010 out ...
0
votes
1answer
79 views

ECMAscript - grab field value from specific id number

I'm trying to grab the value from field1 with a specific id number, do a mathematical computation and update the same id number with the new value and update field1. I'm unsure on how to grab the ...
1
vote
1answer
135 views

SP2010 Javascript Object Model: programmactially add calculated column to list

I am building lists and adding fields via the following. I am wondering if I can add a calculated field and how you set the formula in this (or another method): function onCreateRootCause() { var ...
0
votes
1answer
95 views

SP2010 JSOM: when creating field using javascript, how to define date only instead of date & time

I create a list using: function createProjectList() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var listCreationInfo = new ...
3
votes
2answers
290 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
0
votes
2answers
3k views

How to get document URL of a Document Library item given Item ID and URL - using javascript?

I have access to a document library item URL. E.g. /Documents/Forms/DispForm.aspx?ID=585 Based on this information, I would like to get the URL of the document associated with this item. E.g. ...
0
votes
0answers
124 views

Trying to get all selected items from a list

Im trying to get all items selected in a list but unable to do so with the code below: getItem = new TextBox(); getItem.Text = "get item"; getItem.Attributes.Add("onkeyup", ...
0
votes
0answers
38 views

Sharepoint List entry

I have a requirement where I need to enter a SharePoint list with hyperlinks but I want those links to open in new tab. I entered the following script: ...
0
votes
0answers
217 views

How to add and delete items in SP list using multi select box?

My question is that I am using a multi select list box to insert selected data to sharepoint list and I am using ecmascript object model. <select id="dd" multiple="multiple"></select> ...
1
vote
0answers
74 views

Update CEWP without refreshing page

I have a webpart which contains 3 charts. The charts are built using google's chart API and SPJS Chart The problem I face is that I'm trying to get the charts to seamlessly update as the list gets ...
0
votes
1answer
85 views

Custom newfrom (upload a picture and fill in the picture url)

I have to customize an announcement list new and edit form. In the form is there is a Picture Colum. But I don’t want the user to go first to a picture library, upload the picture, copy the picture ...
0
votes
2answers
364 views

Using JavaScript to redirect a page

I am using JavaScript to redirect users who aren't owners to a different page. I am using $(document).ready(function() { //check owner status if(!isOwner) { ...
0
votes
1answer
720 views

Freeze Header Row

is it possible to freeze the header row in list? We add some code so the user can scroll trough the content. The code doesn't work for the header freeze. We work with Internet Explorer 10. Have ...
0
votes
2answers
941 views

Javascript fails in chrome and firefox, works fine in IE

I have this JavaScript code for my SharePoint forms which does not work in other browsers but Internet Explorer. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ...
1
vote
1answer
654 views

Javascript : How to handle version conflict errors when using javascript COM?

so I use quite a bit of the javascript client object model for CRUD operations to lists from custom pages (inputs) and I have found that I get version conflict errors on saves from time to time....its ...
0
votes
1answer
330 views

Javascript Object Model REST/AJAX: does callback/resulting function have access to the id of newly created item

so if I use rest like method to create a list item in javascript, can I get the id of the newly created item in the callback/result function? function createNewRecord(url, body, callback) { ...
1
vote
1answer
355 views

column not found when creating list item with Javascript

I am making a SharePoint app with javascript. I am trying to add a list item to a list I have defined in visual studio. I have done this just by adding a list in the solution explorer, and I made ...
0
votes
2answers
566 views

How do I delete potentially many items from more than one list using JavaScript?

I'm trying to use a script to remove multiple list items from multiple lists. I'm using Javascript because I don't have access to Visual Studio. The idea is there's a Parent List item in a ...
3
votes
1answer
3k views

SP2010 Javascript REST API: updating list item using MERGE and POST

I am trying to use REST API approach in javascript to update a sharepoint list item where I have an id. So I use GET and POST to create records, but per MSDN article it looks like the way to do this ...