03-03-2023 07:30 AM
How can i take a sql result field where I am counting the number of people in the file for a trailer and left pad with zeroes? I have tried a bunch of the expressions shown in several of the answers here but nothing is working. I get
Solved! Go to Solution.
03-03-2023 07:54 AM
It is because the COUNT is an integer, try with this:
"0000000000".slice($COUNT.toString().length) + $COUNT
03-03-2023 07:33 AM
Hi @heidi.andrew,
You can try with the following expression:
"0000000000".slice($COUNT.length) + $COUNT
Let me know if this helps you.
BR,
Aleksandar.
03-03-2023 07:35 AM
Or if you want to do it in more dynamic way where you specify how long should the field be, you can try the following expresssion:
sl.range(0,10).map(x=>'0').join('').slice($COUNT.length) + $COUNT
Just change the second parameter in sl.range(0,x) .
03-03-2023 07:40 AM
I KEEP getting the null:
But i did figure out how to show first day of last month and last day of last month!
03-03-2023 07:54 AM
It is because the COUNT is an integer, try with this:
"0000000000".slice($COUNT.toString().length) + $COUNT