Tag Info

New answers tagged

1

By default, a lookup field contains just one value. In this case, the field value is an object of type String, and the string has the following format: Id;#Value Use int value = new SPFieldLookupValue(item["Project_x002f_Task_x0020_Status_"] as String).LookupValue to read the lookup value and int id = new ...


0

Had a similar issue. Turns out it was a synchronisation issue with Outlook. If you have a list or Calendar linked to Outlook, then all items will be modified during synchronisation. Remove the list/calendar in question from Outlook.


0

You can create a new list and then add the users who should appear in the dropdown. Then create a lookup column and select the users list.


0

LookUp Field Values are stored in format (ID);#(VALUE) You can use below line of code SPFieldLookup lookUpField = (SPFieldLookup)myList.Fields["DMR No."]; SPList lookupSourceList = myList.ParentWeb.Lists[lookUpField.LookupList]; SPQuery query = new Microsoft.SharePoint.SPQuery(); query.Query = String.Format("{0}", lookupValue); SPListItemCollection ...


0

Seems like space in column name will be converted to _x0020_ so you can access the column by internal name as oListItem["Stage_x0020_"+ count]


1

After some experimenting based on the answer provided by C. Marius I've come to the following conclusion: If you are using ItemUpdating: public override void ItemUpdating(SPItemEventProperties properties) { if (properties.ListItem != null && properties.ListItem.ModerationInformation != null && ...



Top 50 recent answers are included