This project is read-only.

Query SPList with lookupmulti field

Feb 15, 2011 at 11:53 PM

I am getting this issue when using LinqToSharePoint to query a SPList with LookupMulti field.

For example, I have a SPList called User, in this list, there is a column called CostCenters, which is a lookup field (allow multiple value) links to CostCenter, another SPList. When I query the User list using the following statement, say there are 5 entries in the User list,

var users = from u in context.User select u;

If all 5 entries have value (any # of value) in the CostCenters column, it will return me 5 (users).

If any entry has empty CostCenters, the query will return null for the users. I actually still expect 5 users.

Has anybody encountered the same issue? Is this a bug?

I have spent a couple days trying to figure this out. If this doesn't work, that means I have to switch back to CAMLQuery... !@#!%!