Working with lookup values in SharePoint Lists




Working with SharePoint lists I often use lookup values. But when I write C# solutions for lists I have some difficulties with LookUp Values. Trying to get LookUp Value as string it looks like "213;#lookup value".

At first I tried to use regular expressions. But some later I knew about commands for working with lookup list values. So here they are.

 

And you don’t need neither RegEx, nor Pattern or any other things. Things are simple.

Update:

If you have multiple Lookup Values, you should use SPFieldLookupValueCollection

For example:

 




2 Comments »

  1. What is myGood in multilookup.
    Is is a list or an array.

    Comment by kishan — December 8, 2014 @ 11:43 am

  2. “myGood.vendor” is a string variable. As a result it is something like this: “nike, asics, reebok, adidas”

    Comment by admin — December 8, 2014 @ 7:29 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment





MarkiMarta.com. Notes of web-specialist
Since 2009
18+