1
vote
2answers
75 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
25 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
26 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
17 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
41 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
20 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
23 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
28 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
110 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 ...
1
vote
2answers
93 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
112 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
22 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
58 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
111 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
182 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
84 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
66 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
126 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
69 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
91 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
348 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
73 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
128 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
89 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
285 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
2k 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
121 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
82 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
339 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
649 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
902 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" ...
0
votes
0answers
104 views

How to retrieve user Quicklinks from MySite with CSOM?

this is my first post on SharePoint StackExchange. Is there a way to retrieve current user Quicklinks and show it on the Startsite with CSOM? In this example, the link below "Edit Links" in the Left ...
1
vote
1answer
610 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
322 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
334 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
522 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 ...
0
votes
1answer
377 views

Hiding Column on a List View with Grouping

I have a list that I need to dynamically hide columns on based on user. Sort of a rudimentary Column Level security type deal. This is being done through Javascript and JQuery to simply not display ...
3
votes
2answers
1k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
2
votes
1answer
3k views

Add New List Item with SPServices anonymously

I have an HTML5 + jQuery application with a built in contact form that I wanted to hook into Sharepoint, and Lists seemed an ideal way to do that. I used the jQuery library SPServices to get this up ...
0
votes
3answers
3k views

SharePoint-hosted app don't get my lists

I'm developing a SharePoint-hosted app for SharePoint 2013 (in Office365), but I've a problem accessing lists within a SharePoint-hosted app. My code is well printing the lists, but it only show me ...
4
votes
1answer
665 views

Error using javascript to retrieve a SharePoint list's items

I am trying to use this method to query items of a column of a list in my SP site via javascript (the reason I am doing this is to display that info on the page by modifying the html tags in the DOM), ...
2
votes
1answer
182 views

Filter Calendar view by Title in SharePoint 2010

i want to filter calendar view using title field. Is it possible to filter calendar view without make changes in modify view ?