When running a query over a RCM entity and filtering the data using a custom field an error is exhibit saying that is not possible to filter using the field. The data dictionary also shows the properties filterable = false and sortable = false.
Error message: Bad property expression: <field>; <field> is not filterable / Bad property expression: <field>; <field> is not sortable
Here how it is displayed in Odata data dictionary:
Here is how the field is configured in Job Application template:
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
SAP SuccessFactors Recruiting Management
Reproducing the Issue
- Run a query operation into a Recruiting Managemente entity and use a custom field as a filter;
- Notice that the system gives you an error;
- Now, go to Admin Center;
- Search for OData API Data Dictionary;
- Search for the JobApplication Entity;
- And check that the field has the filter and sort properties set as "false".
In order to change the attributes filterable and sortable you have to make a configuration in the back end. It is necessary to add the custom fields in "Configure Reportable Custom Fields".
Go to Provisioning > Configure Reportable Custom Fields.
Add the field in the correct section as configured in the data model. In this case, I have the field jobStarDate configured as a Date field in Job Application data model:
Save your changes:
Ensure that you do not get any error messages:
Run the Synchronization:
When you receive the email stating the synchronization is ready, go to your instance and refresh the metadata:
In case you do not know how to refresh the Metadata take a look at the article 2171588.
The refresh can take a few minutes to reflect the new configuration. After you finish all the steps, access the Odata Dictionary again and you will see the new values for the attributes filterable and sortable:
IMPORTANT: This process does not work for standard fields. It is not possible to change such attributes for standard fields (custom="false"), as those fields properties are maintained by the system.
The reason this work for custom fields, is because for the custom fields to be reportable, we need to have such those properties on the API (filterable, sortable, and so on...), which is not the case for system managed fields(standard).
2171588 - OData API Metadata Refresh and Export
sort, filter, property, equals, false, true, make, change, attribute, custom, field, change, api, query, by , KBA , LOD-SF-RCM-INT , Integration Center & Intelligent Services , LOD-SF-RCM , Recruiting Management , LOD-SF-RCM-API , Webservices & APIs , How To