Represents a field in a list on a SharePoint Foundation Web site.
0
votes
0answers
16 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
1answer
19 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
14 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
43 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
48 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
34 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 ...
0
votes
1answer
20 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
19 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
23 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
28 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
74 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
34 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
365 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
59 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
62 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
0answers
100 views
How to save data in ItemFieldValue of custom lookup field type?
I have created custom field type inherited from SPFieldText successfully. I save a data in the item value as string of the next format: "id;#title". Now I need to convert the base type from ...
1
vote
2answers
282 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
47 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 ...
0
votes
0answers
81 views
SP 2010 Metadata and Crawled Properties
I'm creating a new custom list in code and when complete, the list looks fine. When I look in the Metadata section, in Crawled Properties specifically, I see most (if not all of my columns) under the ...
0
votes
0answers
42 views
Custom SPField error when re-deploying or upgrading WSP
I have created a custom SPField and is working well. But if I retract/deploy or if a upgrade the solution, I've got this error when accessing the item:
SPField Field type is not installed ...
2
votes
2answers
609 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
75 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
145 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
593 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
54 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
190 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
16 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 ...
0
votes
0answers
104 views
Field display name / static name / title confusion
The msdn documentation for SPFieldCollection.Item[String] says
Gets the field with the specified display name from the collection. In Microsoft C#, this property is an indexer for the ...
0
votes
0answers
110 views
EditForm - custom control and updating field values
I'm using a custom rendering template on a list's EditForm. I created a UserControl with a asp:GridView and I would like to use it to insert mulit lookup field values (the standard multi lookup field ...
0
votes
0answers
33 views
Comments fieldlink not visibile
Here my code to add a field link of comments field to a content type
SPField field = site.RootWeb.Fields["Comments"]
if (field != null)
{
SPFieldLink spFieldLink = new SPFieldLink(field);
...
1
vote
1answer
94 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
136 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
89 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
188 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
281 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
65 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
346 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
136 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
1k 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
230 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
1answer
135 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
121 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
255 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
187 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 ...
1
vote
1answer
846 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
511 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?
0
votes
1answer
601 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”]
...
2
votes
2answers
453 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 ...
1
vote
0answers
42 views
PowerShell error when comparing the fields titles
I've wrote a simple script which will loop through all the webs in all the site collections store all the field id's into the hashtable next with their display names. Later interating
throught lists ...
0
votes
1answer
87 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 ...




