When i use the toString() method on a lookup field i get a string in the form:
Is there a way (a command) to get only the name?
View Complete Post
Got and problem with and lookupfield I create some list instances, list definitions, content types with a lookupfields and all works fine the list resovels the good list source guid so I can selected te values but when
I try to save I get;
<nativehr>0x80070057</nativehr><nativestack></nativestack>Invalid data has been used to update the list item. The field you are trying to update may be read only.
When I manualy create a new list instance from the list definition everything works fine.
I'm guessing that the create list instances in the feature is causing the problem?
What am I doing wrong?
public override void FeatureActivated(SPFeatureReceiverProperties properties)
SPList _SPList = (SPList)properties.Feature.Web.Lists["DestinationList"];
_SPList.ParentWeb.AllowUnsafeUpdates = true;
using (SPSite oSiteCollection = SPContext.Current.Site) // or give a destination site collection here...
using (SPWeb oWebsiteRoot = oSiteCollection.OpenWeb("/sites/Source1/Source11"))
SPList oList = oWebsiteRoot.Lists["SourceProjectList"];
I am getting appended # code value with cross site lookup field value of List in datasheet view. I dont want that hash coded value, i need actual value. Please provide me the solution.
Is it possible to write queries that use IDs instead of text values (Title) when comparing values of lookup fields?
For example: I want to get all items from a list with a Category set to "Category A" (which has an ID=1). Category is a lookup field in this case.
The query I would want to use would look like this:
"<Where><Eq><FieldRef Name='Category' /><Value Type='Text'>1</Value></Eq></Where>"
This of course doesn't return anything, because instead I need to use this:
"<Where><Eq><FieldRef Name='Category' /><Value Type='Text'>Category A</Value></Eq></Where>"
The question is - is there a way of building queries using IDs of lookup fields rather than the text values?
I want to populate a column which is of type lookup.I used the web service provided by the sharepoint. This column should contain multiple values. For this I used the format ID;#lookupvalue.But the column is not getting populated.
The elbatch.InnerXML looks like IS
"<Method ID=\"2\" Cmd=\"New\"><Field Name=\"RFPRequirement\" Type=\"Lookup\">623</Field><Field Name=\"Product\" Type=\"Lookup\">232</Field><Field Name=\"Offering\" Type=\"Lookup\">49</Field><Field Name=\"Services\"
Type=\"Lookup\">212;#B: Event Management Service;#215;#(B) Incident Management Service;#217;#(B) Proactive Problem Management Service</Field></Method>"
Also I tried separating only the IDs by ;#.The elbatch.innerxml is
"<Method ID=\"2\" Cmd=\&q
I created one simple list and added one column - lookup - I've chosen some source list and field, then marked "Allow multiple choice". I created new item in that list, by adding more than one valie to that coulm.
The problem is, when I use CAML query, that column has such values:
and it's suppose to be like this:
do You have any idea, why it doesn't query first ID?