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

learn more… | top users | synonyms

0
votes
1answer
232 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 ...
4
votes
2answers
1k 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
403 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
563 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 ...
2
votes
1answer
394 views

How to update field name for a list?

I am creating custom lists(fields,CT,List Def and list Instance) A and B with visual studio. I have site column called "Status" i have used those column name in ListA and ListB. Suddenly i need to ...
2
votes
2answers
962 views

Using the ItemAdding EventReceiver to update multiple fields based on values from one field

I have a custom SharePoint 2010 SPfield of type SPFieldMultiColumn. The data in this column is stored in a delimited string, which is parsed and rendered in a readable format in most areas (list view, ...
1
vote
2answers
149 views

What's A Field Group?

I need to create a field programatically, but the field has a required "Group" property. What is this property? What does it do/change? and what's a sensible value? MSDN as usual, failed to enlighten ...
0
votes
1answer
546 views

Sharepoint how to add field to list where field with such name already exists?

I have sharepoint list 'Events' with field Location. I am trying to add from web existing field with same internal name from other package. var fields = contentType.ParentWeb.Fields; SPField ...
0
votes
0answers
22 views

owner field value disappears when coping document to another SC

On RootWeb of both site collections I have created same User field (owner). I mean same user field becuase I used same ID (GUID), name and everything. Then I add the field to a content Type and add ...
1
vote
1answer
147 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
235 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 ...
0
votes
1answer
141 views

add field directly to a Document library or via a Content Type

What is differents between adding a field (Site column) directly to a document library or via adding the field to a content type and then add this content type to the list? Because fields directly ...
0
votes
1answer
468 views

New SPField shows in the view of my SPList but doesn't appear in any forms (edit, new)

I add a new column to a SharePoint list (the list is built on a content type) like this: SPField textfield = list.Fields.CreateNewField(SPFieldType.Text.ToString(), "new column"); ...
0
votes
2answers
535 views

why does the ReadOnlyField hide the field in forms?

i have a field that i want to make not editable for the users. its a field of type text. I have a read about doing it with javascript and content editor webbpart, but i want to do it ...
0
votes
1answer
81 views

full name of the user in a User Field

I have a list which among other fields contains a user field, shows domain\username. Is there a way to show full name of the user in a User field?
1
vote
1answer
546 views

Modifying XSL for multi lookup field

I'm trying to create custom XSLT for a multi lookup field, based on this article. When changing disable-output-escaping to yes I can see the html I want to modyify: <a ...
0
votes
1answer
223 views

What is a good way to determine via server object model if a field supports multiple values?

When looking at an SPField object, how can I tell if it supports multiple values? I.e. a Choice field that is displayed using Checkboxes, a Managed Metadata field that allows multiple values, Person ...
1
vote
2answers
3k views

Try Get Field with client object model without error

Question regarding the client object model. I wrote some client script for a procedure, but i don't know, how can I determine if the list or item has the field available or not? For example: ...
1
vote
3answers
374 views

How can I add Custom Field settings to all OOB Field types?

I need to add a custom "Check Box" property to all existing OOB SharePoint column types. This should appear in the Additional Column Settings section for any column type created; this property will be ...
0
votes
2answers
256 views

ContentType.FieldLinks.Add() issue with hidden and required

I have a feature that does the following in the feature activation Code : Creates a new SiteColumn (Type=Text, Hidden=False and Required =True) Set the french version of the Name (using ...
0
votes
1answer
250 views

Custom Field PropertySchema Type=User

I have a custom field in my SP Project. In my .xml file, I have a propertySchema and a user field inside it. Currently the field does not accept multiple users/groups. How can I change that? I ...
0
votes
1answer
428 views

Problem with visualization SPmenuField in SPGridView

I have created SPGridView and added one SPMenuField as the first column and some BoundFields. Then I added MenuTemplate to the first column. But there are rectangles with white color border (look at ...
0
votes
1answer
257 views

Field required in Content type, but not in my list

I don't know why but when I try to bind a list with my content type, fields having a status to "Required" in my content type are not Required at all in my List. I'm binding the field with this ...
3
votes
1answer
2k views

UserMulti Field not allowing multiple inputs

I am trying to add a muliiple user site column using the following: <Field ID="{FC2612C2-1C60-45C1-949A-A49BECD8DB02}" Name="test" DisplayName="test" Group="test" Type="UserMulti" ...
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?
1
vote
1answer
1k views

Find content types for given column

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.listsfieldusedin.aspx $web = Get-SPWeb http://”sitecollectionurl” $column = $web.Fields[“Column Display Name”] ...
3
votes
2answers
861 views

Create custom SPFieldLookUp that allows multiple values

I am pretty new to creating a custom field tupe and I have recently come across a need to create a custom SPLookUPField that allows multiple values. The main requirement is to change the way the ...
0
votes
1answer
124 views

How to identify if the list field come from web or site col?

I have a following task in sharepoint 2007 to identify if the list fields come from the parent web or site col, this i'm planning to do with a powershell script. So what I want to do is to iterate ...
0
votes
1answer
187 views

How to get rid of a broken SPField? Field is not updatable / deletable

I have a broken field in my site collection that is not updatable / deletable. Every change that I try to make on the field does nothing - the field is in the same state as before. I tried it via UI, ...
0
votes
1answer
296 views

SharePoint OM wont' read item property

I have a list item with one field Classes which is a multiple choice lookup. I want to implement an ASPX page which contains a ListBox which is filled with values from the Classes field. The following ...
0
votes
2answers
763 views

Using the FieldRendingControl for a given content type

I'm creating a webpart that acts like a new form. Based on a view I'm getting on fields and rendering them in my webpart using spfield.FieldRenderingControl. My columns are site columns, at this ...
1
vote
1answer
158 views

using calculated field in calculated field

I have field1, field2, field3, calcfield1, calcfield2, complexCalcField1 Calcfield1 and Calcfield2 use field1, field2 and field3 for its values. ComplexCalcField1 uses Calcfield1 and Calcfield2 for ...
2
votes
2answers
4k views

SetFieldValue for a TaxonomyField

I'm on a solution where I create a term with some subterms in the termstore. After that I create a sitecolumn and a listcolumn. When setting a value to the listcolumns with ...
2
votes
1answer
216 views

why updating formula, title in large list/library programmatically takes really long time

I have to update formula of calculated field. I wrote method for that, it is working fine and is updating formula as well. But it takes really long time to update formula in large library ie library ...
0
votes
2answers
248 views

FieldRenderingControl of SPField throws an exception for Survey List

I have created a Survey List in MOSS 2007. The field used in the survey is of 'Choice' type. While getting the field value in a custom web part program on another page, the FieldRenderingControl of ...
1
vote
1answer
291 views

Update field by code behind

I have an existing list with a text field and records in it. Now I want to change that text field into a calculated field to make it concat two other text fields in the list (possibly by changing the ...
1
vote
1answer
1k views

How do I get values of fields from custom lists?

I have a custom list ("Contacts") as well as a web part with forms. I want to take the custom list fields and map them to the web part form. My problem is getting the values from the custom list. I've ...
1
vote
1answer
97 views

What are the largest and smallest values that can be stored in an SPFieldDateTime?

What it says on the tin, basically! I assumed it's the same as a regular .NET DateTime struct, but whenever I try to store 01-Jan-0001 (smallest DateTime value), I get an error. Can't find it on MSDN ...
0
votes
1answer
1k views

BaseFieldControl in SPControlMode.Display not display correct values

I'm creating my own Display Form based on a view in a webpart. I'm getting the list (Document Library), and view, and then iterating through the fields, and creating a BaseFieldControl and then adding ...
1
vote
1answer
746 views

What type is Number field?

I have a Field, that has Type="Number". What type of variables can I assign to it? Will the field support float or double? oListItem["numberField"] = data; What type can data be? Cross posted from ...
0
votes
1answer
343 views

Changing SPField cause no changes

I try to change an SPField after SPList creation, but I'm not getting any results of that change. using this code: SPField oSPField = oSPList.Fields[new Guid("MyFieldGuid")]; ...
2
votes
1answer
391 views

Get all lists and sites using a given site column in sharepoint 2007 using powershell

In other words, is there a SPField.ListsFieldUsedIn() equivalent in SharePoint 2007? Ref: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.listsfieldusedin.aspx
2
votes
1answer
315 views

Have different column title in Edit View form and view itself

I'm using C# code to automatically create a read-only Note column that is a truncated version of an existing Note column. list.Fields.Add(field.Title + " (truncated)", SPFieldType.Note, false); At ...
1
vote
1answer
158 views

Custom field type - how inherit attributes from base field type

I need to create custom field type which must inherit ATTRIBUTES from inherited field type (e.g. Note). I know how to add custom attribute on my custom type (using fldtypes...xml, custom ascx,...) ...
3
votes
3answers
367 views

The CHOICE element contains the value within its body. What gives?

As stated on MSDN, the CHOICE element contains the value within its body. That means that in a field, if I have: <CHOICES> <CHOICE>foo</CHOICE> ...
2
votes
1answer
633 views

SPFieldMultiLineText.UnlimitedLengthInDocumentLibrary = true

We are running into problems with the 255 character limit on a multiline text field in a document library. I can change the setting to allow unlimited length, but the following warning is displayed: ...
8
votes
2answers
781 views

Localization on a SPField created in code

When you declare a SPField in CAML, you can add the localization in the code: <Field ID="{57258F13-19B2-4A97-B244-090845B5C4AB}" Type="Text" Name="Partner" ...
3
votes
1answer
290 views

Placing CompositeFields for multiple list items on one form doesn't work as expected

In a workflow task, in custom edit form, i use CompositeField to render relevant fields current task item and for workflow item by setting a different context for CompositeField. However if i put ...
0
votes
1answer
509 views

Custom Field value not visible on a view

I have created a custom field based on SPFieldUrl. What I want, is basically just a normal Url field functionality, but I don't want it to be visible when new item is added to the list (a webpart is ...