Represents a field in a list on a SharePoint Foundation Web site.

learn more… | top users | synonyms

0
votes
1answer
15 views

Retrieving columns created by user not built in columns

I want to retrieve columns in SPList which are created in the UI not the built in columns, I tried with the !field.FromBaseType but it's not working, I tried with the ...
0
votes
1answer
69 views

How can I set/select a field in the display form?

I'm in a SharePoint Display form and want to do some calculations on the client's side to populate a blank single line of text field. In an edit form, to set and select my value I have something ...
3
votes
3answers
72 views

How can I get the status of a Workflow in C#

I need to get the status of a Workflow programatically. Things i tried: item[workflowName] - gave me a "8" altough the workflow is completed (seems to always return 8, I don't know why) (was not ...
1
vote
1answer
53 views

How to get username through REST

I am currently working with a task where you have a SPList in one farm that holds some data that we need to aggregate into a view on another farm. Therefore I am working on a Visual Web Part that ...
4
votes
2answers
59 views

Get field values from SiteMapNode when getting Items from PortalSiteMapProvider

I'm trying to query my list using PortalSiteMapProvider. Here is my Code: public List<string> GetChachedItems(string webUrl, SPQuery query) { SiteMapNodeCollection nodeCollection = ...
2
votes
0answers
89 views

Custom field XSLT Rendering Issue in SP 2007, Works on 2010

I have created a VS 2008 WSP builder solution. IN that i have a custom field which has a XSL for list item view rendering using XSLT. This Solution does not render the image or hyperlink in SharePoint ...
1
vote
1answer
287 views

How to set the default value to sharepoint date time field programmatically?

I want to set the default value for the sharepoint's built-in field ArticleStartDate programmatically. But I am unable to do so. My code is as follows: SPField articleDate = ...
0
votes
1answer
52 views

Change Display name for a Site Column

Following is my script to change display name for a Site Column. However when I look at display name it still remaining unchanged(in Schema). It only updated title not display name. $w = Get-SPWeb ...
0
votes
0answers
47 views

Adding custom PublishingRollUpImage to pagelayout

Is it possible to create your own PublishingRollUpImage. Do I need to map Crawl properties with new Managed Properties to make the new one act like a PublishingRollUpImage when it comes to search ...
0
votes
1answer
75 views

adding link to SummaryLink field using Powershell not working

I have created a Summary Link field and added it to a page layout and created a page based on this page layout. I have tried to add links to the summary link using powershell but the links do not ...
1
vote
2answers
226 views

Updating 'Created By' field in SP2010 programatically

I'm trying to import data from an .xml file to a custom list in SP2010(created programmatically). I'm able to create and update all fields except 'Created By' as it says that "Cannot update read only ...
1
vote
0answers
43 views

Determining wether SPContentType and SPField are created by user or not

I am doing a migration tool (web part) that copies a site collection from point a to point b. Everything works so far, but currently only custom lists are copied to point b. Now I need a way to ...
0
votes
1answer
39 views

How to add clickable and filterable user field for users not in site

I have users in string like "Mikhail Pushin" and I want to add clickable links to users in a column of list item. Also I should be able to use filtering on this user column. Unfortunately, I can't do ...
0
votes
0answers
5 views

showing ModifiedBy field on Page Layout [duplicate]

I have created page layout using VS 2012 for publising pages. Ho do I add a field to the Page Layout which shows who has modified the page last time.
0
votes
1answer
103 views

error when saving custom user field in a custom Page Layout

I have created a custom user field as follows <Field ID="{9B49F1A5-7FFB-400B-9B0E-0FC4D6C1417C}" Name="AMtalatFieldEditors" DisplayName="My Editors" Type="UserMulti" Mult="TRUE" ...
1
vote
1answer
83 views

find out which page is not published in Pages list

I have a publishing site and about 20 pages in Pages list. When you check out one page the icon is changed and you detect that that page is checked out. However when there is a unpublished page it is ...
0
votes
1answer
100 views

Saving values of multiple TextFields in one SPField

I've written a custom SPField which extends SPFieldText. This Field allows the admin to create a column with a cloze-text, where a user has to fill the missing words. The admin marks the positions for ...
0
votes
0answers
22 views

Hide Field on Specific SPListItems

I am trying to figure out if I can hide/show a field for specific list items using the SP object model. I am aware that you can set the SPField.Hidden property however it appears as though this does ...
1
vote
2answers
36 views

Disappear background in HTML Field

I created HTML field in SharePoint 2010 <Field ID="{3E83492C-0420-473E-AB65-E4355535AFD0}" Name="MyField" StaticName="MyField" DisplayName="My Field" Type="HTML" Required="FALSE" RichText="TRUE" ...
0
votes
1answer
77 views

adding alert on a Date Field

I have a custom list containing Expire date field. I would like to get an alert (email) 30 days before the expire date for all items in the list. what is the best solution for that?
0
votes
2answers
270 views

Which field type can I use for more than 255 characters?

I try to create a new field programmatically. See code below. This type of field has a maximum of 255 characters. I would like to have more characters, like the page-content field. Which type do I ...
0
votes
2answers
109 views

Adding SPFieldLookup to specific content types in Custom List

I have a custom list that contains a number of custom content types. When a web is provisioned this custom list is provisioned. In addition to custom list is an Asset Library which is will serve ...
0
votes
0answers
94 views

Create Field and Content Type in Host Web

I have tried to provision fields and contenttypes to the hostweb but with no success. This is the code to provision the field: $.ajax( { url: appweburl + ...
1
vote
2answers
357 views

Field level permission development

I am aware that there already are some questions regarding on how to implement field level permissions customization in SharePoint, such as: SP 2010: column permission Permissions for List or ...
0
votes
0answers
54 views

Edit Integer SPField value in Microsoft Word

I added an two Integer SPField type to a document library: Started and Finished to indicate the year when two events took place with a given document. I did this over the standard number column as an ...
0
votes
1answer
190 views

Copy list item field value to newly created custom column

I have the necessity to switch from using a default field to using a custom one in a number of list. I have also to "copy" the value contained in the old to-be-deleted column to the new created one. ...
0
votes
1answer
100 views

How can I make sure that if linebreaks is inserted inside a multiline textbox it gets displayed like it

I have a field that looks like this in my schema: <Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" Type="Note" RestrictedMode="TRUE" NumLines="15" Name="Body" ...
0
votes
0answers
68 views

Multichoice boxes in SharePoint (SPFieldType)

I have the following code: SPList targetList = spWeb.Lists["Certification"]; list.Fields.AddLookup("MemberCertifications", targetList.ID, false); ...
1
vote
0answers
75 views

JavaScript function in URL field value

Is it possible to set the value for the URL field so that when clicked it runs a JavaScript function? I have created a field which stores links to files in SharePoint, but when clicked, the file is ...
0
votes
1answer
111 views

Editing SPFieldMultiColumn and saving updated value

I can get a reference to my SPFieldMultiColumn var documentLinkFieldValue = listItems[i]["DocumentLink"] as SPFieldMultiColumnValue; var oField = listItems[i].Fields["Document Link"] as ...
1
vote
0answers
34 views

Is it actually possible to instantiate SPField?

I want to create a custom List programmatically from scratch: First I add: Guid listID = web.Lists.Add(title, description, SPListTemplateType.GenericList); list = web.Lists[listID]; Then I want to ...
0
votes
0answers
166 views

Adding SPFieldCalculated to a Document Library not working

I am using this piece of code to copy Fields from Document Library "A" to Document Library "B". I have only one issue when adding a calculated. This is the code. private static string ...
0
votes
2answers
37 views

Retrieve reference for list from Lookupfield

I have a sharepoint 2007 and in a document library eventhandler: in ItemUpdating, i would like to be able to retrieve the value by id's from lookupfield. So with other words i have to get the ...
0
votes
0answers
17 views

Retrieving the SPLookupFieldCollection with particular ID's

The situation is following: I have this kind of string = 58;#value;#59;#value2;#60;#value3;.... So as you see this is just if i do: SPFieldLookupValueCollection collection= new ...
1
vote
2answers
119 views

ItemAdding in document library

I have an issue with setting the field in item updating event in document library with SharePoint 2007. I have following situation, I have a document library, and when i add a document based on one ...
3
votes
1answer
147 views

Changing enterprise keywords column title programatically

I'm trying to rename an enterprise keywords column in a specific list of a subsite. In a Feature Activated event receiver i tried to set the column's display name by setting its title using the ...
0
votes
2answers
752 views

How to display and get the value chosen in an User field?

I'm very new at Sharepoint and I faced to a trick issue. Here is the situation : in an .aspx.cs file, I've created an EventHandler called btnValidate_Click, raised on a click on a button. In this ...
2
votes
2answers
101 views

Dates and times in Properties vs Fields

I'm trying to roll my own archiver for SharePoint. I always try to let the underlying object serialize itself. Only when it fails do I try to use .ToString(). Anyway, while inspecting the Properties ...
0
votes
1answer
126 views

Set SPBuiltInFieldId.WorkflowInstanceID value

I start worklfow programmaticaly on SPListItem (custom ContentType). When i try to save all fields but "WorkflowInstanceID", its ok. But, item[SPBuiltInFieldId.WorkflowInstanceID] = ...
1
vote
0answers
65 views

External lists: Field GUIDs always empty?

I want to turn an external list into a DataTable using the ID/GUID values of external list's Fields as the DataTable column names; however, I've noticed for the external list I'm using, all of the ...
0
votes
2answers
88 views

How to programatically tell if a field is a taxonomy / managed metadata field?

I am going after SPList.fields and getting the collection of fields... I would like to eventually return only the fields that are managed meta data. Any ideas on how I can do this?
0
votes
2answers
236 views

How to Disabling SharePoint TextField Control Programmatically?

I'm developing a user control containing textfields bound to my list SPListFields and I'm using this user control twice with two different modes ( Edit or New). In my Edit mode I want to disable a ...
1
vote
1answer
42 views

Find a specific field on a site and the set it to “Required” in a EventReciever

I have created a EventReciever that will be activated when a site gets created. This site have a announcement webpart. When they click on "add announcement", newform.aspx pops up as a dialog and there ...
1
vote
2answers
4k views

How to retrieve Users and Groups seperately from a “Person or Group” column via C# code?

I have a field in the discussion list, which allows the initiator of the discussion to specify the people to share the discussion with. This field is typed as 'Person or Group' that allows selection ...
0
votes
1answer
216 views

How to set a UserMulti field via a UserField Control?

I have a list similar to the usual Tasks Sharepoint List and I introduced the field assigned to as a multi user field like this (I have read somewhere that with Mult option should always be set to ...
0
votes
1answer
172 views

RichTextField vs NoteField class

I'm about to create a field called details so I was thinking to make it a NoteField then I discoverd RichTextField. And I found out that RichTextField inherits from NoteField which is a text box for ...
3
votes
2answers
990 views

Using PowerShell how do I change the column ordering for a SharePoint List

Been trying to search for the answer to this, what I need to do is re-order the fields of a SharePoint list and propagate that change down to 300+ sites (should have used a content type, but oh well) ...
1
vote
0answers
320 views

SPListItem.Update Not working

So I have this really simple function which updates a couple of fields on two different lists (one is a document library) The thing is on the document library does not updates any of the fields I need ...
2
votes
2answers
3k views

Programatically add SPFieldChoice (with Choices) to List

I have a list that I want to add a choice field to programatically. I also want to specify the choices. Here is the code: var fieldChoice = (SPFieldChoice)list.Fields.CreateNewField("Choice", ...
2
votes
1answer
484 views

SPField not visible on default view when SPList created programatically

I'm creating an SPList item programatically. Everything goes fine, I add a list, I add spfields to it. SPList list = (SPList)oWeb.Lists[listName]; SPField libraryNameField = new ...