Tagged Questions

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

learn more… | top users | synonyms

1
vote
0answers
91 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
162 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
52 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
2answers
41 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 ...
1
vote
2answers
153 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
207 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
1k 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
196 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
165 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
87 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
196 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
346 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
70 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 ...
4
votes
3answers
8k 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
325 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
350 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
527 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
5k 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
666 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
507 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
1k 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
172 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
665 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
1answer
31 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
160 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
277 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
155 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
555 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
620 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
84 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
656 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
258 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
401 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
296 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
299 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
480 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
276 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 ...
4
votes
1answer
3k 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
947 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
131 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
196 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
319 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
851 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
165 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
5k 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
229 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 ...