I am using an extension attribute to collect "cost center" information for each device (based on user ID that the devices are assigned to). It uses the "Department" LDAP attribute for my organization, which is synced from Peoplesoft initially. What ends up happening is I get a 3 or 4 digit number. To make it match the rest of the organization's naming scheme, I need to have 6 digits always. So if the cost center is 3 digits, it should append 3 zeroes (000738). If it is two digits, it should append four zeroes (004565). If it is 6 digits, it should show the 6 digits (59F42Z). I am unsure how to take the current extension attribute and add those leading zeroes. I am guessing I need to change it to run a script instead of the direct LDAP pull.
Any help is appreciated.