Hello,
I was wondering if is it possible to format numbers. I have a variable that is made up by concatenating "S -" + CodeNo.
CodeNo is a variable that stores the values of integer date type.
So the output will be S-1, S-2, S-3 etc...
However, I would like to format the number such that it looks like S-001, S-002, S-003 etc..
So I am wondering if it is possible to format the number so that it comes out the way I want it. Thank you!
Hi Low Ding En,
In your Expression editor, check the FormatText built-in function under the Format folder.
Hope this helps!
Given your description, I'd say you would need to do it on the Assign node that does the concatenation (open the Expression Editor on the value of your assignment).
Typically, if I only want to display information in a specific format, I wouldn't create an extra variable for that, I'd just do whatever concatenation/formatting I need directly on the Expression widget that displays the info on the screen (so on my Expression widget I'd set it's Value property to "S -" + FormatText(CodeNo, ...)).
"S -" + FormatText(CodeNo, ...)
Thank you so much for your help and advice! I managed to get it to work now! I appreciate it!