Tag Info

New answers tagged

1

You must cast the field to a SPFieldLookup. This object has members like LookupList, LookupField and LookupWebId that will help you identify the correct list and field See the MSDN documentation here


1

Take reference to lookup list and use List.GetItemById(Id) to get the item and take the column value and construct the lookup collection. Example: SPList lookupList=properties.web.lists["lookupListName"]; SPListItem lookuplistitem=lookupList.GetItemById(4); //Here Id is 4 string filedvalue=lookuplistitem["lookupfieldname"];//Which field you are taking as ...


0

As per my understanding there are two lookups from same list/library. SPFieldLookupValueCollection for each field is different. The format is ID;#Value here ID is listitem ID and Value is what you stored for respective fields in lookup list. For "LookUpField" "ID;#LookUpFieldValue" For "LookUpFieldWithPicker" "ID;#LookUpFieldWithPickerValue" Before ...


0

It is recommended to reference the field by it Internal Name or ID In your code there is no any guarantee that you are really modifying title for Enterprise Keyword field, because Display Name is used for reference So, below is updated code to change Enterprise Keyword field title: //Rename title for Enterprise Keyword field in List public ...


0

I finally found a solution. I'm still unable to display a , so I used a PeopleEditor as explained here : http://karinebosch.wordpress.com/sharepoint-controls/peopleeditor-control/ Then, in my aspx.cs file, here is how I get the selected user : PeopleEditor peManager = (PeopleEditor)i.FindControl("peManager"); peResponsable.AutoPostBack = true; ...


0

Please, try the following code: SPUser user = web.EnsureUser("{user login}"); item["Manager"] = user; item.Update();


0

I know this is old, but thought I'd answer for completeness anyway. For multiple users you should have: Type=”MultiUser” Multi-"True"


0

To my knowledge dates are stored as sequential serial numbers so they can be used in calculations. By default, December 31 1899 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900. Time also as part of a date value is also represented as decimal number (for example, 12:00 PM is represented as 0.5 ...



Top 50 recent answers are included