SAP Knowledge Base Article - Public

2538333 - Odata - Change API custom field property for Filterable and sortable attributes to equals true - Recruiting Management

Symptom

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

error msg.png

Here how it is displayed in Odata data dictionary:

 filterable false.png

Here is how the field is configured in Job Application template:

field config.png

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Recruiting Management

Reproducing the Issue

  1. Run a query operation into a Recruiting Managemente entity and use a custom field as a filter;
  2. Notice that the system gives you an error;
  3. Now, go to Admin Center;
  4. Search for OData API Data Dictionary;
  5. Search for the JobApplication Entity;
  6. And check that the field has the filter and sort properties set as "false".

Resolution

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:

custom filter 1.png

Save your changes:

custom filter 2.png

Ensure that you do not get any error messages:

custom filter 3.png

Run the Synchronization:

custom filter 4.png

custom filter 5.png

When you receive the email stating the synchronization is ready, go to your instance and refresh the metadata:

metada refresh.png

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:

filterable true.png

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).

See Also

2171588 - OData API Metadata Refresh and Export

Keywords

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

Product

SAP SuccessFactors Recruiting all versions