It looks like there is an annoying bug with GetListItems:
-
When IncludeMandatoryColumns=TRUE
And the list has at least one mandatory muti user or multi lookup column
And that none of the multi value columns are specified in the ViewFields
GetListItems will return duplicated items - one for each value in the multi-Value column.
--
With one multi value column, one could consider this is by design even though this looks quite strange to adopt this approach in this very specific situation and not in all others.
--
The problem is that things get really buggy when you have a list with multiple multi-value columns.
-
Say we have the following mandatory multi-value columns: MVC01 (multi-user) and MVC02 (multi-lookup)
The following item (I separate multiple values with a comma):
Title : Whatever value
MVC01: John,Rick,Blade
MVC02: Beverages,Condiments
-
If you do not specify any of the multi-value columns in ViewFields element, GetListItems will return 3 items:
Whatever value - John - Beverages
Whatever value - Rick - Condiments
Whatever value - Blade
-
One would expect the following result:
Whatever value - John - Beverages
Whatever value - John - Condiments
Whatever value - Rick - Beverages
Whatever value - Rick - Condiments
Whatever value - Blade - Beverages
Whatever value - Blade - Condiments
--
Things get even worse if you specify one of the multi-value column as part of the ViewFields element.
-
Say you specify MVC02, GetListItems will only return one item:
Whatever value - John - Beverages,Condiments
-
If you specify MVC01, it will return:
Whatever value - John,Rick,Blade - Beverages