We have this formula in our MS Flow - Update Item task...
concat(items('Apply_to_each')['T_x002d_Code']
,'-'
,items('Apply_to_each')['BoxNo']
,'-'
,
items('Apply_to_each')['ID'])
but we need to add leading zeros to the BoxNo and ID so it ends up like this:
A02-00001-000235
we also tried:
substring(concat('000000', variables('ItemID'))
, sub(5, length(variables('BoxNo')))
, add(6, length(variables('ItemID'))))
but with no luck.
The BoxNo value can go from 1 to 99,999 so we need to pad up to 4 leading zeros
The ItemID can go from 1 to 999,999 so we need to pad up to 5 leading zeros
How can we format those fields like that?