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

learn more… | top users | synonyms

1
vote
2answers
3k views

How to have a column contain multiple users

I have a list with various columns. One of those columns is to store users. However, when I use the code configurationListFields.Add("Limit_Access_To", SPFieldType.User); I am only allowed to ...
1
vote
1answer
16 views

remove column from showing up in document properties

Which property in the object model do I use to tell an SPField not to show up in the document properties in Office integration? I tried ShowInEditForm but that didn't work. i want my Status column to ...
1
vote
0answers
50 views

Field's TitleResource.SetValueForUICulture() does not work for the web's default language

I have a site column in my site collection whose title I change / translate with following PowerShell statement: $w = Get-SPWeb "URL to the site collection" $f = ...
1
vote
1answer
248 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 ...
1
vote
0answers
46 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 ...
1
vote
0answers
84 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 ...
1
vote
0answers
48 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 ...
1
vote
0answers
79 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 ...
1
vote
1answer
54 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
0answers
437 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 ...
1
vote
1answer
159 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 ...
1
vote
1answer
161 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,...) ...
1
vote
3answers
382 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
154 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
31 views

How retrieve custom fields only when using SPListItemCollection?

Hi with following code I am retrieving a DataTable from a List: using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { ...
0
votes
1answer
148 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 ...
0
votes
2answers
570 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
307 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 ...
0
votes
1answer
33 views

get all possible value for lookup field

I've a site column define in choice and with two possibles values. FR NL I'd like to retrieve this two values. i've tested this to get the spfieldlookup but now i'm blocked to get all values: ...
0
votes
1answer
26 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
91 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
170 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
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 ...
0
votes
1answer
261 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 ...
0
votes
1answer
579 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
481 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
567 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
82 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?
0
votes
1answer
235 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 ...
0
votes
2answers
269 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
270 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
445 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
265 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 ...
0
votes
1answer
127 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
192 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
302 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
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 ...
0
votes
1answer
354 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")]; ...
0
votes
1answer
516 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 ...
0
votes
0answers
17 views

Execute Custom Code Or Code Behind on DataFormWebPart submit

I want to create custom form that submits entered data to a custom list and do some Extra Logic with the entered data. I also want to add some extra custom controls like Captcha etc. and be able to ...
0
votes
0answers
29 views

Title field is reset when I create a template (list, site, etc.)

In a rush, I changed the "Title" field within my custom list on the "item" content type. I had done this previously and clicking "title" on the content type had let me edit it at the list level. But ...
0
votes
2answers
30 views

powershell : create column in a group

Like described in the title, i'm writing a powershell script that create a content type and some column. The issue is that my columns are not in the specified group but in group "custom column" Here ...
0
votes
0answers
18 views

Changing Field Type of a column

Is it possible to change Field Type of a column from TaxonomyField to Single Line of Text? It is a SharePoint online solution.
0
votes
2answers
41 views

Is there a way to find a unique internal name in a SPFieldCollection without a try catch?

The method SPFieldCollection.GetFieldByInternalName throws an error if it can't find the field with the given the internal name. Is there a way to determine if a field with an internal name exists ...
0
votes
0answers
54 views

Cannot Get custom properties in BaseFieldControl

A have a custom field for cross site lookup. At the creation, i have to save the webId the ListId and FieldId, right now everything works. But in the Field Class i cannot save this properties and at ...
0
votes
1answer
139 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
88 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
166 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 ...
0
votes
1answer
58 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
6 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.