SAP Knowledge Base Article - Public

2793737 - Using $select operation in JobReqScreeningQuestion query returns no result - Recruiting Management

Symptom

API returns empty response when $select option is used in the URI to query from JobReqScreeningQuestion entity.

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. Perform a query on JobReqScreeningQuestion entity. For example: https://<api-server>/odata/v2/JobReqScreeningQuestion?$filter=jobReqId eq 55 &$format=json
  2. See that the API response contains properties present on JobReqScreeningQuestion entity:
    full_result.jpg
  3. Now perform the same query, but add the $select operator. For example: https://<api-server>/odata/v2/JobReqScreeningQuestion?$select=jobReqId&$filter=jobReqId eq 55 &$format=json
  4. Notice that API response has empty result:
    no_result.jpg

Cause

This behavior is expected due to system design and because JobReqScreeningQuestion entity has an internal dependency on the value jobReqContent.

Resolution

To query a select of an attribute from Odata, the URI must contain jobReqContent for the $select to work; else, it would not return proper or expected response.

For example, using the same query in the examples above, add the jobReqContent into the $select operation:

Query: https://<api-server>/odata/v2/JobReqScreeningQuestion?$select=jobReqId,jobReqContent&$filter=jobReqId eq 55 &$format=json

Result: 
select_result.jpg

Note: Notice that API returns only the field present on the $select operation, that is jobReqdId, as it should. See Implementation Guide for details on how $select query option works.

See Also

KBA: 2944380 - JobReqScreeningQuestion, JobApplicationQuestionResponse and JobApplicationInterview Entity returning no data in Integration Center and OData API - Recruiting Management

Implementation Guide:

Keywords

jobReqScreeningQuestion, jobReqContent, job, req, content, screening, question, $select, operator, api, response, result, empty , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem

Product

SAP SuccessFactors Recruiting all versions