You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Display Name for Emplid

3 replies [Last post]
Guest's picture
Guest

Hello Compshack,

I like to display Name (Related Display Field) for emplid (Connrol Field) on a page. I included PS_PERSONLA_DATA, PS_NAMES into the project. I try to drag names field into my custom page, but it is NAMESGBL_SBR in those records, so I cannot drag subrecord into my page. Please let me know how can I display name on page for emplid.

CompShack's picture
User offline. Last seen 6 years 4 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Re: Display Name for Emplid

This should be as easy as placing emplid field on the page, make it "display control" and then place a name field on the same page and make it related display to the emplid field. I don't know why this is not working for you but below is another way (coding way) where you can accomplish the same thing.

Peoplesoft actually use this as a delivered on the HR_PERSONAL_PHONE component and page.
The function to get the name is get_person_name so you need to call is and pass the emplid. Here is the code:

Declare Function get_person_name PeopleCode FUNCLIB_NAME.PERSON_NAME FieldFormula;

/* This function converts the name to a user friendly format */
DERIVED_HR.NAME = get_person_name(your-record.EMPLID, "", "", "");

n/a
Ashar's picture
User offline. Last seen 4 years 34 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: Display Name for Emplid

Open the page in App designer.
Goto Insert menu -> Select Edit Box (or use Alt + I and the E )
Click on the position in the page where you want to place the field. Duble click on the field. Choose the record name and field name.

Now make the EMPLID as the display control and the field u just added as the related display.

Thanks,

Ashar

CompShack's picture
User offline. Last seen 6 years 4 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Re: Display Name for Emplid

One thing to keep in mind though - if the EMPLID is coming from a view, and the view has more than 1 key field, your related display field will not show any data (it will be empty). Here is where the above code comes handy :)

You will be ok if the emplid is from an actual table, or the view has only one key field.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog