Tagged Questions

Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

3
votes
1answer
783 views

Get last major published version of items returned as DataRow (from SPSiteDataQuery)

Does anyone know the solution for this? If I'm querying items by SPSiteDataQuery I receive a DataTable with DataRow objects. I could fetch the current version of an item and check if it ends with ...
1
vote
0answers
114 views

SPListItem.Tasks always empty

I have a custom sharepoint (2007) list (named testlist) on which I attached a test workflow (built with sharepoint designer 2007 and named testwf), which only task defined in the 'Actions' section at ...
2
votes
1answer
217 views

How to import one single row of data from excel to one list item in a SharePoint 2010 list?

I have a problem where we want users to attach a file to a new item and the SharePoint list will automatically read on row or column of data (maybe 20 cells-worth of data) and populate some additional ...
1
vote
6answers
3k views

Value does not fall within the expected range. But the field exist

I have the following problem. I have a list with a custom content type, when programmatically I want get an information from my SPListItem I get the following exception: Value does not fall within the ...
0
votes
1answer
468 views

How to delete a specific item from a list

I have writen the following code that should delete some items from a list on the current site, but it must contain some error and it currently doesen't work as expected. protected void ...
0
votes
3answers
453 views

Change the value of Author field

I am copying over items from one list to another list. After copying the "Author" field gets populated with "System Account" and so I wish to update some fields in the destination list as follows. I ...
0
votes
1answer
719 views

selected SPListItem in the current list

how to get the selected SPListItems in the current SPList ? I thought I would find a helping property like this: SPListItemCollection mySelectedItems = ...
1
vote
1answer
157 views

difference between item[] and item.fields[]

I want to retrieve let's say the title field of my item so what's the différence between doing these acces methods : SPList myList = properties.List; string mytitle1 = ...
0
votes
1answer
274 views

SPFieldCollection TryGetFieldByStaticName bug?

I had expected that if TryGetFieldByStaticName succeeds and returns a value, there would be an SPField in the item that has a static name equal to what I used in the TryGet... call, but no? I.e. can ...
3
votes
4answers
489 views

Set permissions on an item depending on column value

Is there anyway to set permissions on an item depending on a column value? I was think about creating a feature to do this but do I have to?
1
vote
1answer
1k views

Odd and Even list item color

i saw a sharepoint where its list item as a background color (blue) for odd list item number and another (white) for even numbers. I dont know where i can set this. I looked into designer and i could ...
0
votes
2answers
4k views

add value to text field in list with ItemAdded event receiver

i have a textfield in a list, that i want to fill with custom text when a item is being added. nothing happens when i try to debug it, the breakpoint in the method is never reached. Please can ...
1
vote
1answer
991 views

Export-SPWeb with Where Clause to filter List Items?

I am trying to export list items to a local folder but I only want certain items, not the complete list.Is this possible? I have tried to iterate through the SPListCollection with the "Modified" ...
0
votes
1answer
176 views

Sharepoint List Event raised when a current view is changed

Is there a event which is raised when current view of a SharePoint list is changed. For example the current view displays all items in the list and now the user selects a different view say Added by ...
2
votes
1answer
6k views

How to retrieve all items from a list (with custom fields) by javascript object model

I need to get all my custom fields from my list by Javascript Object Model.. The code I wrote down is this: var items; $(document).ready(function () { ...
2
votes
1answer
170 views

Why do I have 2 ways of retrieving an average rating? Which one do I choose?

It appears that, on enabling social rating against my list for my custom content type, I now have 2 extra fields for each SPListItem in my list: AverageRating and RatingCount (as explained Blog Link) ...
0
votes
1answer
291 views

How to Get List Values From Sharepoint 2007

I am looking for a way to get list values from SharePoint 2007. Right now I am using PowerShell, and have the following script: #load Microsoft.SharePoint.dll ...
0
votes
2answers
1k views

Move Existing SPListItem to an Existing SPFolder?

Is there a way to programmatically move an existing list item (SPListItem) to a folder or do I need to make a new item that is a duplicate of the list item in the folder in question and then delete ...
2
votes
1answer
2k views

SPListItem item[“Author”] throws ArgumentException on blog lists only for some users

We have a webpart on our SiteCollection home page which aggregates the most recent posts from a number of blog subsites. The code looks like this: using (SPSite site = new ...
0
votes
1answer
249 views

DataformwebPart outside of List folder and ListItemID from another Query string parameter not working

I've tested this before, but I can't seem to get it to work again. I've got a Doc library with webpart pages. Create a new page and in SPD add a CustomListForm to a custom list in display mode. I ...
0
votes
4answers
472 views

Object ref not set to instance of object in SPListItem extension method

I am attempting to write an extension method for the SPListItem type to ease the pain of getting SPUserValues as strings. I am getting an "Object reference not set to an instance of an object" ...
0
votes
3answers
1k views

Is it possible to determine if a given URL represents an SPListItem?

I am wondering if there is some sort of way to check a URL to see if it represents a list item before calling SPWeb.GetListItem that I haven't found. I have code that needs to retrieve a list item ...
2
votes
0answers
824 views

Url to an item with Client Object Model

Regarding my question, at this moment i'm writing some client object model code and I can't find a way to retrieve create make an url ... My question now is: How can I create an url to an item? I ...
2
votes
1answer
2k views

Adding SPListItem using SPWeb.ProcessBatchData method

I am looking for adding SPListItem using SPWeb.ProcessBatchData method. Could any one please help me on syntax for adding list item to my custom list.
1
vote
1answer
123 views

Disable save item button while save process is not completed

User clicks on Save Button and saving procedure can take "few" seconds. User can click again..that`s why i need to disable save button, how can i do this?
0
votes
0answers
44 views

Submit data into repeating table in infopath to a sharepoint list [duplicate]

Possible Duplicate: How to submit data from repeatable table in infopath form to a sharepoint list? I am trying to solve this problem of pulling data into a repeating table, then having the ...
2
votes
3answers
577 views

Disposing item.web

I have read this article and known which objects should be disposed. But I doubt whether oItem.Web returns the same object as spcontext.current.web object or it creates new one. If it creates new, I ...
1
vote
1answer
484 views

Set data to Sharepoint Gridview from List and remove appropriate selected columns

I am using c# and I have a SPList with fields such Title and Translation. I want to set Word and Translation into SPGridview. I can retrieve data from my List: string translation = ...
2
votes
0answers
139 views

Is my Object Casting Model acceptable?

I'm creating a SharePoint application, and am trying some new things to create what amounts to an API for Data Access to maintain consistency and conventions. I haven't seen this before, and that ...
0
votes
1answer
144 views

Pass an SPListItem into an external web service as a parameter?

Can you pass an SPListItem object as a parameter into a custom [WebMethod] deployed into SharePoint? I understand that it would be essentially disconnected from the the SharePoint context if it was, ...
0
votes
2answers
779 views

How to copy a Lookup field to another lookup field on another list?

I have this script which creates a new site (SPWeb), which is based on a template. I will the copy the data from the main list into the new list on the new site. Both list is based on the same ...
0
votes
2answers
530 views

Retrieve selected list item title

Is there a way to retrieve the selected list item title/name? For example if I click an item say "Distributor" in custom list, how can I get this title in a string or variable?
2
votes
1answer
686 views

Parse pasted images from Outlook emails as attachments in Sharepoint list

I have a Sharepoint list with incoming email enabled, and an email event receiver to create items out of incoming emails. Once an email is received, it sends an email back to the sender with the ...
4
votes
0answers
83 views

Can you add comments to an append-only field in a list in Sharepoint 2010 using C#? [duplicate]

Possible Duplicate: Can you programmatically add comments to an append-only comment field in a custom item list using C#? Posted on stack exchange first, then I found this Sharepoint ...
0
votes
1answer
1k views

How do I use a variable in CAML query to send approriate email

I have created two list. One is "Storage" the other is "Approvers" I am able to retrieve all values in the column 'System' in the "Storage" list by iterating through the column list, like so and ...
1
vote
1answer
1k views

List ItemUpdated Event not firing when updating item from code

I have a problem with my eventreceiver. It is set to fire on updating item from a list, and works very good when I update that item from Sharepoint's web UI. However I have some code that goes through ...
3
votes
1answer
212 views

SPListItemVersionCollection - iteration performance

This question is related to my issue described here: SharePoint 2010 Performance troubleshooting On SP 2010: Does anyone knows if there is some performance limitations while using ...
3
votes
2answers
800 views

Attach ListItem to TaskItem

I've created a custom approval worfkflow for an listitem. Now I need to see the values of the item in the taskitem. So I think one way would be to attach the ListItem to the TaskItem. Does anybody ...
1
vote
1answer
271 views

Disable approvement for a single listitem

I am creating a custom list in Visual Studio 2010 for SharePoint 2010. I want to set "approvement needed" for single listitems to false or disabled. My intention is, that a element can be approved ...
1
vote
1answer
338 views

Checking if list exists client-side

I'm developing a Silverlight web part and can't use server-side objects like SPList. I normally get items from a list called "Locations" which has two fields - "Title" and "WOEID". The problem is I'd ...
2
votes
1answer
1k views

Updating a SPFieldMultiLineText field

I have an SPListItem. I have a field on the item of type SPFieldMultiLineText. How can update the value of that field?
5
votes
1answer
402 views

Get SPListItem from LINQ

I have used SPMetal to create a data context. I can query my lists. The queries return an object of the type of list that they are in. Is it possible to convert this type into a normal SPListItem ...
1
vote
4answers
1k views

Returning a SPListItem in conjunction with RunWithElevatedPrivileges

* *Clarification. Application == Site Definition. Direct Database access is out the window ** I've created an application for SharePoint that utilizes some new approaches to coding List Access. I've ...
1
vote
0answers
230 views

Validate list item with javascript API

I want to develop a custom datasheet view to edit a list. I add item through the javascript API. The problem is that the service doesn't control fields value. For example : - I add an item with a ...
1
vote
2answers
2k views

update SPList using csv via Powershell

knowing that is possible in PS, exporting SPList items to PS objects(link1 link2) what is the best way, to go into the other way: Create/Update an SPList from an exported csv or format-table.
1
vote
2answers
1k views

URL : How to add multiple Query String within Source Query String?

I have a simple question regarding the &Source Query String in SharePoint 2007, which normally SharePoint used in on List Item page, when click on "Close" button, it can redirect back to the ...
2
votes
1answer
943 views

Getting User details from field “AssignedTo” in a custom List

I have a Custom List, which have different fields, when I click on any user in field "assignedTo" it navigates me to another window and I can see user's Account, Name, email etc. I am able to get all ...
0
votes
1answer
181 views

Getting Sharepoint Users and comparing them with SPList field

I have a Custom SPList that has a field "Assigned To", now I can add as many items as I want, and they can have same title and same User they are assigned to, but what I want is a script so that I ...
2
votes
5answers
2k views

List Item Timeout

I am trying to open/close the a custom list item with 11500 items but I am getting an error which seems to be a timeout error, i checked the logs and found 'Unable to execute query: Error 0x80131530'. ...
1
vote
1answer
125 views

How to push a specific SPListItem through a workflow with code?

I would like to push a specific SPListItem to the final step in a State workflow, skipping all the intermediate steps (if a certain checkbox is checked). Currently, I have an event receiver hooked ...