Hi, I have a somewhat complex data structure in sharepoint where I have a main list, for example Points of Sales with basic data such as address, etc... I have another list where the Item ID of the first list is a field and that contains data about the sales management, one field being the Area Manager. I want to query the first list for all items where the Area Manager is X.
For example main list contains:
| ID | POSName | POSAddress | POSCity | POSZip |
| 1 | POS A | POS Address A | POS City A | POS Zip A |
| 2 | POS B | POS Address B | POS City B | POS Zip B |
| 3 | POS C | POS Address C | POS City C | POS Zip C |
| 4 | POS D | POS Address D | POS City D | POS Zip D |
| 5 | POS E | POS Address E | POS City E | POS Zip E |
| ... | | | | |
And the Sales Management list:
| Title | POSID | AreaManager | POSManager |
| North | 1 (points to POS A) | John | Julie |
| North | 4 (points to POS D) | John | Patrick |
| East | 2 (points to POS B) | Adam | James |
| North | 5 (points to POS E) | John | Mark |
| ... | | | |
So I want to query the main list where the area manager is John, and it should return records 1, 2 and 5 ... In other words, query the main list for all items for which an item in the sales list (Sales.POSID = Main.ID) exists where the area manager is John.
Stephane