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

Announcements

No record found.

News and Announcements icon
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,843 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,843 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,843 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,843 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 738

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 453 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 286 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans