SAP Knowledge Base Article - Public

2735859 - How does the Picklist order relates to the order of the results of an OData API query - Recruiting Management

Symptom

My picklists values in my instance are ordered in certain way, does that affect the order of the results of an OData API query?

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

  • OData API
  • Picklists

Reproducing the Issue

  1. Access the system, go to Recruiting and open up a Job Requisition;
  2. Go to the country of the Job Requisition and click in it to select another country and notice the order:
    rep_1.jpg
  3. Now, query in OData API in the Job Requisition entity selecting the JobReqID and country and you will notice that the order comes different;

Cause

The results that come from the OData Query are according to the order in the database, regardless if this data is from a picklist or not.

Resolution

No, there is no relation in between the order of the picklist and the order of the results coming from an OData API Query.

The results that come from the OData API query are ordered according to the data inserted into the database, and you can change the order, or sort the data, by using the $orderBy when composing your query.

Now, the order of the picklist is only applicable to the data displayed on screen, when you as a user of the system accessing a specific page and using the picklist, then the system will order the data according to that order.

Keywords

Order, Data, OData, API, Sort, Query, Picklist, Recruiting , KBA , LOD-SF-RCM-API , Webservices & APIs , How To

Product

SAP SuccessFactors Recruiting all versions