AnsweredAssumed Answered

How to convert single number into 3 digit code using Python and field calculator?

Question asked by jacksonbrown99 on Mar 29, 2018
Latest reply on Mar 30, 2018 by lpinner

I have three fields in an attribute table that I have combined through the field calculator to generate one value in my 'name field'. It displays like this - 'RSB01-1'. However, I want the final digit to display as a three digit code e.g 001 instead of just 1. What python function do I use in the field calculator?


The code I have looks like this : ''.join([ !NRS!, !NSA!, "-", str(!SeqNo!)] )


I know some function is needed around the final field (str(!SeqNo!), I jut don't know what.