Get all the interviews without repeating candidates

Tagged:

Currently contains 4 posts

Avatar

February 16, 2021 03:03

TIhelping

Hi,
I need to obtain all the interviews that went through a status of some companies, I would like to know if there is a way to filter the results so that the candidate id is not repeated. I have this idea but I want to know if it exist a easy way to filter results because right now i am filtering the results in code

https://www2.pcrecruiter.net/rest/api/interviews?Query=(InterviewStatus eq Terna 1 OR InterviewStatus eq Terna 2 OR InterviewStatus eq Terna 3 OR InterviewStatus eq TERNA) AND InterviewStatus ne Backup AND CurrentInterviewType ne OutOfProcess AND InterviewStatus ne AET AND (CompanyId eq 191916890701400 OR CompanyId eq 233184047453791 OR CompanyId eq 139358610655964 OR CompanyId eq 153812644678872 OR CompanyId eq 232630311838815 OR CompanyId eq 546305422047460 OR CompanyId eq 494217907492596 OR CompanyId eq 279267902786078 OR CompanyId eq 120790552244548 OR CompanyId eq 112662735167465 OR CompanyId eq 125761485831219 OR CompanyId eq 184454418698735 OR CompanyId eq 205235749436575 OR CompanyId eq 115003429967012 OR CompanyId eq 388709413403583 OR CompanyId eq 803323905075935 OR CompanyId eq 159983680052743 OR CompanyId eq 207746998724385 OR CompanyId eq 199789014266395) &Order=AppointmentDate DESC&Accept-Language=en-US&ResultsPerPage=100

Avatar

February 16, 2021 07:51

Jarrid-PCRecruiter

I haven’t tried myself, but have you tried using SELECT DISCTINT? That should return only 1 value for a given row/primary key. You could also ask that someone add all of the records in question to a rollup list and then query for records that are on said list.

Avatar

February 16, 2021 08:00

Jarrid-PCRecruiter

Actually, after some thought, none of this is really going to do you much good, unless you have some kind of sort that you’re looking to do. I can tell you how to pull interviews and only 1 per candidate but unless you’re pulling the most recent (which is what I assume you’re looking to do) you’re just going to get a random interview as a result. (There are Order and GroupBy options at various endpoints).

Avatar

February 16, 2021 17:55

TIhelping

Yes, i need to pull the most recent activity of each user and make sure the CurrentInterviewType isnt out of process and CurrentInterviewStatus is in this case TERNA

Reply to thread