Skip to Content
Apr 21, 2020 at 04:35 PM

CPI - EmpJob query fromDate and toDate



I'm building an iflow that will have to indicate when there was a job change from a static date in the past to the current date. I am able to retrieve the historical information from that date in the past, and the current information. In the CPI iflow, I am querying SuccessFactors via OData API, specifically the EmpJob entity.

The issue I'm having is that an employee could have more than one job change from the historical date and the current date, but I need to choose the first job change. I can query for all of the job changes by using the fromDate = 2019-11-24 & toDate = 2020-04-21 parameter, but if the record has multiple job changes, there will be multiple records pulled in by this query.

Is there a way in a CPI iflow to select only the earliest record? It would be something like the earliest startDate (field from EmpJob) among the records pulled, after the historical date. Is there a way to do this with a filter, or mapping, etc.?