web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

how to show employee ID where single integer value are in empID Field.

(0) ShareShare
ReportReport
Posted on by 61

Here single Integer not show Name

public str ahmad_getEmpName(PREmployeeId _employeeId)
{
	utcDateTime 	validTo = DateTimeUtil::maxValue();
	utcDateTime 	validFrom = DateTimeUtil::minValue();
    str				empName;
    //PREmployeeId 	empid1 = "*"  _employeeId;
    PREmployeeId 	empid1 = strRFix(_employeeId,5,'0');

	while select firstOnly ValidTimeState(validFrom, validTo) prEmploymentInformation
        where prEmploymentInformation.EmployeeId == empid1

    {
        empName = prEmploymentInformation.EmployeeName;
	}
	
	return empName;
}

I have the same question (0)
  • Fawad Ahmad Profile Picture
    61 on at

    I want to show through single Integer employee ID have name and department also show.

  • GirishS Profile Picture
    27,827 Moderator on at

    Hi Fawad,

    Your question is not clear.

    Can you elaborate?

    Thanks,

    Girish S.

  • Fawad Ahmad Profile Picture
    61 on at

    I want to display rawpunchesReport where in screenshot employees ID whose one integer e,g in sreenshot empId field , ID number 3 and ID number2 have not display employees Name. .

  • GirishS Profile Picture
    27,827 Moderator on at

    May be the employee's name is missing from the table.

    Seems you are using custom table or view to get the employee details for the report.

    Just open the table browser of the particular table or view and see whether employee name is there or not.

    Thanks,

    Girish S.

  • Fawad Ahmad Profile Picture
    61 on at

    zeros padding in employeesID values

  • GirishS Profile Picture
    27,827 Moderator on at

    I am not able to understand your question.

    Are you asking how to add 0 in the employee Id before.

    Suppose if the personnel number is 3 then it should display like 0003?

    If yes, then you need to add a code to add 0 in the employee id field. Refer to the below code and see whether its suit your scenario.

    int strLen;
    
    strLen = strLen(tableName.PersonnelNumber);
    if(strLen <= 1)
    {
        tempTable.PersonnelNumber = "000"   tableName.PersonnelNumber;
    }
    else
    {
         tempTable.PersonnelNumber =  tableName.PersonnelNumber;
    }

    Thanks,

    Girish S.

  • Fawad Ahmad Profile Picture
    61 on at

    yes but many employees ids have 00012  .  

  • GirishS Profile Picture
    27,827 Moderator on at

    Have you tried the code which I have sent?

    Thanks,

    Girish S.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans