AnsweredAssumed Answered

If expression to pad with zeroes

Question asked by cpoynter on Jul 30, 2019
Latest reply on Jul 30, 2019 by cpoynter



I have the following expression:


if(${building_num}>0 and ${building_num}<=9, '000','000') or if(${building_num}>9 and ${building_num}<=99,  '00','00') or if(${building_num}>99 and ${building_num}<=999,  '0','0') or if(${building_num}>999 and ${building_num}<=9999,  '','')


When testing in Connect, the result is exactly what I am after (i.e. 0001), however when published, I am getting 'true' as part of the response value (i.e. true1) without my zero padding.


How do I construct the expression so 'true' isn't captured but my zero padding is correct?