I've got a SP2007 list (List A) with two reference-fiels (Column 1; Column 2) that reference items from a different list (List B). For some Opalis automation I need a CAML Query that gives me the results of where Column 1 = Column 2.
Any Ideas?
|
I've got a SP2007 list (List A) with two reference-fiels (Column 1; Column 2) that reference items from a different list (List B). For some Opalis automation I need a CAML Query that gives me the results of where Column 1 = Column 2. Any Ideas? |
||||
|
I'm assuming you are using a Lookup choice field. You'll need a query to run against List A like:
Where the integer value of If you don't know the ID of the choice in list B, you'll have to look it up manually or with another query. |
|||||||
|
<Eq><FieldRef name='column1' /><FieldRef name='column2' /></Eq>? – Steve B Jun 27 '11 at 8:00<Eq><FieldRef name='column1' LookupId="TRUE" /><Value type='Integer'><FieldRef name='column2' LookupId="TRUE" /></Value></Eq>? – Steve B Jun 27 '11 at 9:26