When I apply a DOM filter query with a combo of OR and AND I do not receive the expected result.
for example:
(
(
(DomInstance.FieldValues.e748ba20-2c0a-4528-bb37-a81dd5869b15[Guid] ==3375fe15-d491-4c01-a1d4-a57fc5b3622a) OR
(DomInstance.FieldValues.e748ba20-2c0a-4528-bb37-a81dd5869b15[Guid] ==01a3d7f0-d920-428d-b1fe-001354db33ce)
) AND
(DomInstance.FieldValues.070a5e8c-20bc-4aec-8c6d-1921ea431834[Int32] ==0) AND
(DomInstance.FieldValues.011bc232-7741-4221-9cad-b20770bbe639[DynamicList<String>] !=Closed)
)
The above is applied on data that contains multiple matching items for the "01a3d7f0-d920-428d-b1fe-001354db33ce" but 0 for "3375fe15-d491-4c01-a1d4-a57fc5b3622a"
I would expect to have all the records for the 1 matching filter, but the result is 0 items.
This filter is applied via :
var pagingHelper = domHelper.DomInstances.PreparePaging(fullFilter);
Is there something wrong with my filter or the way I'm retrieving this?
Hi Mieke,
Can you share how these filters are built in the code?
One thing you could try is removing some parts of the filter or built it term by term until it stops matching the expected data.
I tried creating it in a script and found the string representation to differ in the types. The output of mine all contain 'DynamicList's as types between the square brackets, where this seems to be the only case for the last one in your version.
I am not sure if this could be the cause, but I would always recommend using the ‘DomInstanceField’ extension as this was made specifically for filtering the field values of a DomInstance. This guarantees the correct filter type is used.
Thomas, it is not so easy to share as it is dynamically generated based on an input (API method)
I did see a difference compared to your example: I’m using:
DomInstanceExposers.FieldValues.Field
instead of .DomInstanceField