|
I have a number field that can have 0 to 4 decimals. I use the following code to format the decimals to not show trailing zeros.
if right(ToText(CurrentFieldValue,4),4) = "0000" then 0 else if right(ToText(CurrentFieldValue,4),3) = "000" then 1 else if right(ToText(CurrentFieldValue,4),2) = "00" then 2 else if right(ToText(CurrentFieldValue,4),1) = "0" then 3 else 4
I have now been asked to create a second field that has this information in a barcoded format. We use Precision IDs barcode package for 128 and it demands that the field is a string. The function looks like this:
PrecisionID_C128_A ({CRYSTAL_PICKPLANS.QTY_PICKED})
If I add a ToText to the number field I loose my decimal formatting.
PrecisionID_C128_A (ToText({CRYSTAL_PICKPLANS.QTY_PICKED}))
How can I convert my number to a string keeping the decimal formatting?
Thanks,
|