Discussions
Need help to filter customer/space record based off of Customer.Number and Spaces.Asset.Name
I've below API call that is not filtering rows based off of Spaces.Asset.Name - In the output I would like to see only one record - for Customer - "TOR02" & Space - "01"
Body:{
"QueryExpression": {
"Criteria": {
"Conditions": [
{
"PropertyName": "TenantCode",
"Operator": "Equal",
"Values": [
"TOR02"
]
},
{
"PropertyName": "Spaces.Asset.Name",
"Operator": "Equal",
"Values": [
"01"
]
}
],
"FilterOperator": "And"
},
"Distinct": true,
"PropertySet": {
"Properties": [
"*",
"Spaces.Asset.Name"
]
},
"Count": 2,
"FirstResultIndex": 0
}
}
Output:
{
"Entities": [
{
"Data": {
"DisplayAs": "10 Bay Street",
"Name": "10 Bay Street",
"WorkZone": {
"Id": 171
},
"Dba": "10 Bay Street",
"Instructions": "",
"TenantCode": "TOR02",
"TaxExempt": false,
"Spaces": [
{
"Asset": {
"Name": "01",
"Id": 300028
},
"ConcurrencyId": 2,
"Id": 2156
},
{
"Asset": {
"Name": "03",
"Id": 300142
},
"ConcurrencyId": 2,
"Id": 2157
},
{
"Asset": {
"Name": "04",
"Id": 300256
},
"ConcurrencyId": 2,
"Id": 2158
},
{
"Asset": {
"Name": "05",
"Id": 300370
},
"ConcurrencyId": 2,
"Id": 2159
},
{
"Asset": {
"Name": "06",
"Id": 300484
},
"ConcurrencyId": 2,
"Id": 2160
},
{
"Asset": {
"Name": "07",
"Id": 300598
},
"ConcurrencyId": 2,
"Id": 2161
},
{
"Asset": {
"Name": "P2",
"Id": 300712
},
"ConcurrencyId": 2,
"Id": 2162
}
],
"IsRemoved": false,
"ConcurrencyId": 2,
"Id": 227
}
}
]
}