Skip to main content
Solved

PL/SQL API to get name from Employee ID

  • July 23, 2024
  • 4 replies
  • 282 views

Forum|alt.badge.img+5
  • Sidekick (Customer)
  • 14 replies

Can anyone advise on a PL/SQL API to get either the Person ID or the Person Name from an Employee ID?

E.g. for an individual with Employee ID = 12345, Person ID = “JSMITH” and Person Name = “John Smith”, is there any API to get either JSMITH or John Smith from 12345?

Best answer by COVJAMIEB

Hello. You could try,

Company_Person_API.Get_Person_Id(company_id, emp_no) OR

Company_Person_API.Get_Person(company_id, emp_no)

 

4 replies

COVJAMIEB
Hero (Partner)
Forum|alt.badge.img+11
  • Hero (Partner)
  • 218 replies
  • Answer
  • July 23, 2024

Hello. You could try,

Company_Person_API.Get_Person_Id(company_id, emp_no) OR

Company_Person_API.Get_Person(company_id, emp_no)

 


Forum|alt.badge.img+5
  • Author
  • Sidekick (Customer)
  • 14 replies
  • July 23, 2024

Perfect, tvm!


Alperen
Sidekick (Partner)
Forum|alt.badge.img+5
  • Sidekick (Partner)
  • 42 replies
  • July 23, 2024
Hello,The person ID result will be returned from the above functions. The name will be returned when you try the following operation.

PERS_API.Get_Name(COMPANY_PERSON_API.Get_Person_ID(company_id,emp_no))


Michael Kaiser
Sidekick (Customer)
Forum|alt.badge.img+9
  • Sidekick (Customer)
  • 117 replies
  • December 9, 2024

Hi,
 

But that would lead to nothing:
 

Now what is the CPA?
It stands for the View COMPANY_PERSON_ALL.
The Join looks like this:
 


The CPA View is under the following objects:
 

HTH
BR
Michael