SAP Knowledge Base Article - Public

2987148 - API Error response during Query of User Entity SFOdata.User "[COE0003]Bad property expression: defaultFullName; defaultFullName is not filterable"

Symptom

When API query has standard 'defaultFullName' field in the '$filter' or any non-filterable field in the '$filter' statement

API response throws error :

[COE0003]Bad property expression: defaultFullName; defaultFullName is not filterable

Environment

SAP SuccessFactors HXM Suite OData API

Reproducing the Issue

1. Query User API Entity, with filter to field 'defaultFullName

GET 'https://<api host URL>/odata/v2/User?$format=json&$filter=defaultFullName eq 'XXXX'&$orderby=firstName,lastName&$top=4&$select=defaultFullName'&$format=json

Where XXXX is the User's full name value

2. API sends back response with below Error

{"error":

{"code": "COE_BAD_PROPERTY_EXPRESSION",

"message": {"lang": "en-US","value": "[COE0003]Bad property expression: defaultFullName; defaultFullName is not filterable"}

}}

Cause

Behavior is working as designed

  • If you download the $metadata for Entity User, you'll find that the field 'defaultfullname' property 'filterable' is set to 'false'. This is a standard field from a standard entity unfortunately it is hardcoded and cannot be changed.

> Query Metadata : https://<api_endpoint>/odata/v2/User/$metadata

> Result
...
<Property Name="defaultFullName" Type="Edm.String" Nullable="true" sap:required="false" sap:creatable="false" sap:updatable="false" sap:upsertable="false" sap:visible="true" sap:sortable="false" sap:filterable="false" sap:field-control="userPermissionsNav/defaultFullName" sap:label="defaultFullName"/>
...

 

Or

  • Check Odata API data dictionary and see 'filterable' property for the fields is set to 'false'

Resolution

Recommend to use available fields with filterable property set to 'true'

e.g. firstName and lastName fields are filterable if you check $metadata or from Odata API data Dictionary

 

Sharing a query sample i did in my demo below. I expect for the API to return all users with firstName of either 'Michael' or 'Deepa' AND whose lastName of 'Schmidt' or 'Singh' with the filter 

&$filter=(firstName in 'Michael','Deepa' and lastName in 'Schmidt','Singh')

- note that i used logical operator 'in' plus 'and'

https://<api_endpoint>/odata/v2/User?$select=firstName,lastName,defaultFullName&$filter=(firstName in 'Michael','Deepa' and lastName in 'Schmidt','Singh')&$format=json

 

> Response : I got three users, 2 users with same name but with different userId and 1 other unique user.

{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "https://apisalesdemo4.successfactors.com:443/odata/v2/User('dsingh6')", "type" : "SFOData.User"
}, "defaultFullName" : "Deepa B Singh", "firstName" : "Deepa", "lastName" : "Singh"
}, {
"__metadata" : {
"uri" : "https://apisalesdemo4.successfactors.com:443/odata/v2/User('103234')", "type" : "SFOData.User"
}, "defaultFullName" : "Deepa B Singh", "firstName" : "Deepa", "lastName" : "Singh"
}, {
"__metadata" : {
"uri" : "https://apisalesdemo4.successfactors.com:443/odata/v2/User('1000971')", "type" : "SFOData.User"
}, "defaultFullName" : "Michael Ñino Schmidt", "firstName" : "Michael", "lastName" : "Schmidt"
}
]
}
}


Keywords

[COE0003]Bad property expression: defaultFullName; defaultFullName is not filterable, COE003, SFOdata.User, odata/v2/User , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HXM Suite all versions