Questions tagged [splistitem]
Representation of a list item within the SharePoint API.
521
questions
1
vote
1
answer
572
views
Unable to restore list item from recycle bin Sharepoint 2013
Hello a user deleted a record from a custom list. I went to the recycle bin to restore it but when I try it It shows me with the unexpected error screen and the correlation ID. I'm unable to restore ...
1
vote
1
answer
114
views
Workflow not starting on PWA
I have a problem with workflow on PWA.
I created a simple workflow that will send e-mail when a task is assigned to a particular person by Project Manager using PWA Schedule page. The problem is that ...
0
votes
3
answers
223
views
Unable to get the guid of splistitem with SPQuery
I am trying to get some information from a SPListItem by the following code:
SPList list = SPContext.Current.Web.Lists[listName];
SPView spview = list.Views["All Items"];
SPQuery query = new ...
4
votes
1
answer
871
views
properties.ListItem.Url inside an event receiver is working well for discussion board items, while it fails for custom list (url will end with _.000 )
I am working on an event receiver inside my sharepoint server 2013. now inside the event receiver i use the following html code to build a link to the current item which cause the event receiver to ...
1
vote
2
answers
56
views
Help understanding powershell script
I want to list all webs in one site collection via powershell and adapted this script from the internet:
Get-SPWebApplication http://site | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title,...
0
votes
1
answer
803
views
SP - C# Delete Item - Error message: 0x80070005 (E_ACCESSDENIED))
When i trying to delete listItem from list and anonymous access in site perm(for Fund3) is disabled my code throw exception. Where anonymous access is enable everything is OKAY-> items are deleted.......
0
votes
2
answers
4k
views
SP - Delete list item and folders in Recycle bin with C#
I'm with SP13 On-prem and I want to delete all items from lists and all folder in doclibraries in recycle bin...
This is my code for list:
if (list.BaseType == SPBaseType.GenericList)
{
while (...
0
votes
1
answer
209
views
SP - How to delete(clear) folders/items from doclib/list
I want to delete(clear) content of document libraries and lists from my site.
my document libraries have folders and items inside them.
my list have items
How to do this:
This is my code:
...
2
votes
3
answers
8k
views
Update attachment of list item using rest api is failing
I am trying to update attachment of list item using REST API. I am getting the below error:
{"error":{"code":"-2130575257,
Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The
...
0
votes
1
answer
540
views
Programmatically change Document Library ListItem Name and metadata at the same time
Goal: Using an event receiver, change the name of a document in a document library during the ItemUpdated event when a user edits a docuement with other meta data fields.
I'm using an event receiver ...
0
votes
1
answer
618
views
SPServices Sum returned values
I'm using SPServices to query a SharePoint 2010 list, a can get the values that I want but when I try to sum all of then I get this"
Here is the code that i use:
var TotalAmount = 0.00;
$()....
3
votes
0
answers
684
views
Fill Target audience field in a list using PowerShell - Sharepoint 2013
I need to set target audience field in a list while populating the list with data.
How can I achieve this using PowerShell command.
I found this article. But it didn't worked as it throws
Column '...
0
votes
1
answer
445
views
Null SPFile reference when trying to check whether a list item is checked out [duplicate]
I am trying to show an error when a user performs an operation with a list item that is checked out.
How I get the list item:
var listItem = list.GetItemById(itemId);
This works and I can perform ...
2
votes
2
answers
2k
views
Save multiple people/groups in a People or Group field using SP 2013 REST API
I am trying to save a list item in SP 2013 using REST API.
One of the fields, named AccessRights, is a People or Groups type field.
My code works fine when I use this:
dataToSave["AccessRightsId&...
2
votes
1
answer
609
views
Is it possible to get the last approved date and approver name for a List Item?
I have a requirement to show when an item was last approved by an approver and the name of approver.
I searched and could find that Approval Status and Approval comments can be obtained by the columns ...
1
vote
1
answer
2k
views
Create new page when new item added in list using designer workflow
How can one let a workflow 2010 / 2013 create a new page with info from a new list item?
To further explain: When a list item is added to my custom list, I want a workflow to create a page with ...
1
vote
1
answer
76
views
Why cant you change existing fields type in SPO?
So went to my list -> List settings -> clicked on a specific existing field and there was no option to change the type of the field..
Is it not supported in SPO?
0
votes
1
answer
526
views
CSOM, How to prevent duplicate error when create new list item with a unique enforce column value?
I have a list with 2 columns. These columns have "enforce unique values" enabled. I would like to add a new list item in CSOM. But got sometimes the duplicate error. How can I prevent this error? What ...
3
votes
2
answers
2k
views
SPListItem will accept the column display name OR the column internal name
I am working on sharepoint server 2013. now i have the following column named "Date Reported", which have the following properties:-
Display-Name = Date Reported
Internal Name = Date_x0020_Reported
...
1
vote
0
answers
212
views
Update value in custom list that exists on SPHost for the SharePoint Provider hosted App
I have a Provider Hosted App from where I need to update a list item in the SPHost i.e the site where I have added this App.
I have written my code in the JavaScript file but when I try executing it, ...
0
votes
1
answer
114
views
Javascript to update List field
I have created a script to pull data from a URL. I have managed to store the data to a variable but am a little stuck on how to set it to a list form field.
This is an example of the snippet I was ...
0
votes
1
answer
1k
views
How to checkin SPCheckedOutFile
In Powershell i get all checked out file from a library with
foreach($f in $lib.CheckedOutFiles){
//I tried to retrieve item with
$item = $lib.GetItemById($f.ListItemID)//exception item not ...
0
votes
1
answer
526
views
GetItemById throws ServerException
I'm trying to retrieve an item from a list, just for demo purposes. But, when I try to do that, I'm getting a ServerException on the ExecuteQuery().
This is the exception:
An exception of type '...
0
votes
1
answer
624
views
Group By SPListItem in SharePoint SPListItemCollection
I have custom list. with calculated column Department Group.
Department group column takes first left letter of title columns in uppercase.
using SPListItemCollection I'm able to get all items.
but ...
4
votes
0
answers
617
views
SharePoint Online Ribbon Custom Action : Pass multiple itemId in CommandAction's Url
I am developing custom ribbon action using SharePoint hosted app. and this is working fine.When i select any list item and click on custom action then i can get selected list item id.
<...
3
votes
2
answers
1k
views
Query SharePoint List by multiple item IDs
I have a requirement to query SharePoint list items by multiple ids. I have a collection of list item ids and I want to get the list item collection programmatically.
Is there anyway to do through C# ...
0
votes
1
answer
93
views
Anonymous Access Entities
I am a little confused about Anonymous Access. At the site level, there are 3 options namely Entire Web, Lists and Libraries and Nothing. I have the following questions.
If I enable Anonymous Access ...
1
vote
0
answers
67
views
SharePoint List Create item in Main list & Look up list using Javascript
I want to read an excel file & create items in main list and lookup list. The main list is creating an item, but it's not returning the ID synchronously. I tried Success callbacks & deferred, ...
1
vote
2
answers
2k
views
How to find the item ID of a list in SharePoint using REST?
At some point in time, I want to update a specific Item in a list.
I Know that I have to use the REST call to update a specific item. Below is my URL.
http://cloudapps.cctspl.com/sites/...
1
vote
1
answer
87
views
get values from lookup column
I have a list named Users which contains two fields namely User(user or person) and Region(Lookup),In which Region points to another field('Name') of another list named Region which contains fields ...
2
votes
2
answers
2k
views
How to update List item with Managed Metadata column using REST or JSOM
How can i update List item with Managed Metadata column using REST or JSOM?
Any good sample or suggestion will be appriciated....
1
vote
2
answers
603
views
Find list element when page is loaded
I'm trying to get an element once page has been loaded. However when I put the code in window.onload = function () { my code }; it's not working, without window.onloadit get's the element. here's my ...
0
votes
1
answer
498
views
Get workflow associated list items
I have one requirement to get all the list items which has associated with a particular workflow in SharePoint 2013. Like, I have a designer 2013 workflow with name "Test Workflow" which is added in a ...
0
votes
1
answer
840
views
Retrieve List Item Value From Version History Using Powershell
The scenario is I want to retrieve column values(Item Value) of the list from version history and update only single column of item post.
Currently, I am not able to retrieve item object values but I ...
0
votes
2
answers
138
views
How to automatically create item number?
Without programming, I need an item number in the following format: AA-160101-01
AA is static
160 101 is the date,
-01 is autoincrementing number, I want to have it counting from 01 every day.
...
3
votes
1
answer
124
views
Cannot set list item value
I want to set a ListItem value with PowerShell (SP2013).
As the following screenshot shows, I (the current user) have Full Control for this list. However, I cannot edit any field value. The value ...
1
vote
2
answers
12k
views
What are the best practices to get all items from SPList
What is the best practice way to get all items from SPList(with query or without)
This is my ways :
static void Main(string[] args)
{
try
{
using (SPSite mySite = ...
1
vote
4
answers
759
views
Get SPListItem ItemsData
I have the list of items in object SPListItem item. Is it possible to extract certain data from the ListItems property?
The reason I want to do that is because I have a FieldName "AssignedTo" which ...
0
votes
1
answer
84
views
set column value as today's date based on another column value
Can someone help me with the below case?
I have a list with two columns, Status column with values "resolved and "work in progress" and Resolved Date column.
Here is the condition, if Status = "...
0
votes
1
answer
7k
views
how to set the checkbox(mark task complete) option in task list?
I have task list but I didn't find the checkbox (mark task complete) option in my task list.
Thanks in adavance
2
votes
1
answer
292
views
How to store IP Address and very large int account numbers in list? What types are best
I'm making a list and need to store IP Addresses and Account Numbers.
Basically the text or single line of text variable looks best at the moment however I am wondering if anyone else knows a better ...
5
votes
2
answers
332
views
How would I get the Fields which are enabled and the position from left
In my SharePoint list, I have modified the view like this.
I want to get the 'Display' value and 'Position from Left' value for the fields. Is is possible with CSOM or another way?
1
vote
0
answers
98
views
Displaying content of field other than text using JavaScript
I'm still struggling with SP.js handling of special fields, i.e, computed, lookup, Boolean, MultiChoice, on the OUTPUT side.
When building the CAML I know how to add value type tag to be able to ...
4
votes
1
answer
558
views
JSOM bulk SP.ListItem creation: get created Ids
I'm using this approach to bulk SP.ListItem creation:
var ctx = SP.ClientContext.get_current();
var oList = ctx.get_web().get_lists().getByTitle('listTitle');
myObj.forEach(function(d,i)
{
var ...
0
votes
2
answers
1k
views
How to get more than 5000 items in list without enabled throttling?
I'm trying to work with large list but every time I do an operation on a list I have an exception because I have more than 5000 items in my list.
Microsoft.SharePoint.SPQueryThrottledException
If I ...
0
votes
1
answer
1k
views
Get size of a ListItem
I've been recently working a lot of scripting with Powershell 2.0 towards SharePoint 2010, tasked with building various scripts that would for example print some information about 10,000 lists, as a ...
3
votes
1
answer
249
views
Content Editor WP or Script Editor WP won't show Content when Saving List as Template
I created a List Template with a Content Editor Web Part in it and I made sure to click the "Include Content" button when I created the template but my list template does not have the Content Editor ...
0
votes
1
answer
35
views
SharePoint APP with list and pre-defined list item, error in specifying image URL
I am building a SharePoint hosted App which contains a list and pre-defined list items. When I try to deploy app, I get following error
@"Error 1
CorrelationId: 39056be2-5dd1-4c51-ac43-...
0
votes
1
answer
969
views
SP07 - How to get SPListItem Author and Last Editor
I want to get author and editor on SP ListItem:
With this Page_load Code :
SPQuery myQuery = new SPQuery();
myQuery.Query = "<Where><Eq><FieldRef Name='ID'/><Value Type='Text'&...
1
vote
2
answers
12k
views
Pull Data from SharePoint List using JS and converting it into HTML in the following format?
I was wondering how to use JS in order to pull Data from a SP2013 list convert it into HTML using the following structure below.
For example: The List fields are as follows:
Title
Date
Image
Body
...