I have the following API Request:
...api/data/v8.0/rts_xrmsettings?$select=rts_name,rts_value,statecode&$filter=statecode eq 0 and (contains(rts_name, 'Sample') or contains(rts_name, 'Test'))
However the data set return is the following:
{"@odata.etag":"rts_name":"Test","rts_value":"Some Value","statecode":0},
{"@odata.etag":,"rts_name":"(Sample) Test Setting","rts_value":"Now You See Me","statecode":0},
{"@odata.etag":"rts_name":"(Sample) Test Inactive Setting","rts_value":"Now You Don't","statecode":1}
Including an entity with the statuscode=1
why is this entity being included?
if i change my filter to filter=(contains(rts_name, 'Test') and statecode eq 0) or (contains(rts_name, 'Sample') and statecode eq 0)
I receive the desired output
but I am trying to dynamically build the filter string and this is messy to create via code.
In terms of Boolean algebra A.B + A.C = A.(B+C)
So the filters should return the same result, however this is not the case.