Adding a prefix 0 (zero) to the Employee ID

Mike Kiser 1,536 Reputation points

I have a situation where the Employee IDs returned from a Looking Activity have to be 6 characters long. However , some of the Employee IDs must begin with a Zero if they are 5 characters long (please see below) . In the case below the EMPL_ID that is 10042 should be 010042 and I use it in the url to look like

How can I count the EMPL_ID once it has been retrieved to see if it is 6 chars or 5 chars? and then if it is 5, I have to add a zero to precede the 5 character EMPL_ID?


@Nasreen Akter


Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,067 questions
{count} votes

Accepted answer
  1. Nasreen Akter 10,791 Reputation points

    Hi @Mike Kiser ,

    Please try the following expression. Thanks!

    @concat('', if(equals(length(item().EMPL_ID), 5), concat('0', item().EMPL_ID), item().EMPL_ID))  


    If the above response is helpful, please accept as answer and up-vote it. Thanks!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful