Trying to figure out an expression to convert numbers that are 4 digits to 5 digits beginning with 0.
Such as 1605 to 01605
While at the same time leaving 5 digit numbers alone such as 16058 as 16058
Not certain how to go about using the len or if I even need to gather the length of the number.
for i in 0{1000…9999} {10000…99999}
???
Just wanting to:
take the value from a numeric text field box
add a 0 to the beginning of the number if 4 digits in length to make it 5
then have it available to be bound to another numeric text field box
Set the Decimal Format Property of the Numeric Text Box to “00000”. That will force the digit. a “#” eliminates leading or trailing zeroes. No expression or script required.
Data types. Although the value is numeric, for processing purposes you are treating it like a string. I am not sure why you are doing this, but if it is required you will need to convert to string and then bind on the converted tag.
[quote="cswett"]I have the value writting to a int4 memory tag with that number formatting and the value shows correctly.
When I bond that memory tag to the custom int property of the report, the formatting appears to be dropped.[/quote]
Just so I'm on the same page, you mean the reporting module, right?
That'd be a final workaround, but it should be possible to do with the format string in the report. Also, if there's any math that would have to be done to it within the report, then a string won't cut it.