0

I am using ArcGIS Desktop 10.5 and trying to create a unique ID with the following expression:

"city_id"='2'&'002'&"popn_rank"

The expected result would look like 20020001, 20020002, etc.

The problem is that "popn_rank" has a varying number of digits, from 1 to 4 (e.g. 1, 12, 100, 1032). The expression that I entered aboved would output something like: 20021, 200212, 2002100, 20021032.

How do I make sure that "city_id" always has 8 digits?

I'm guessing there's a way of adding something to the expression or changing something to "popn_rank" beforehand, but I don't know how.