Skip to main content
Solved

How to format a input field to add a 0 in front of single digits?


Hi everyone, I have designed a acumatica form where the user can select our products from a list, input the weight of our products manually and the report will generate a barcode comprised of the product ID and the weight. Our product IDs are 6 digits, and the barcode reader can process 8 digits, seperating the first 6 digits of product ID from the last 2 digits of product weight. 

How can I format the Net Weight field in the report, so that when the user inputs a single digits; for example, 7, and the program prints 07? Could someone please help me figure it out? Thanks in advance :)

 

Best answer by lightman

Hi @darylbowman, I put the =’0#’ in the ‘Format’ field like you suggested. I am attaching pictures for your reference:

Format field
The output

However, I have just figured out another solution to this. I modified the code to the barcode reader, so my program will separate the product ID and the weight; abolishing the need to do it from the acumatica end! 

View original
Did this topic help you find an answer to your question?

5 replies

darylbowman
Captain II
Forum|alt.badge.img+13

If I remember correctly, entering =’0#’ in the ‘Format’ field (very first field in your image), should accomplish this.


  • Author
  • Jr Varsity II
  • 9 replies
  • April 6, 2023

@darylbowman thanks for your suggestion. However, it didn’t seem to work :(

I did put it in the  value field for the net weight input. I wonder if i am doing something wrong


darylbowman
Captain II
Forum|alt.badge.img+13

Could you post a screenshot of the properties of that field (like the second image)?


  • Author
  • Jr Varsity II
  • 9 replies
  • Answer
  • April 6, 2023

Hi @darylbowman, I put the =’0#’ in the ‘Format’ field like you suggested. I am attaching pictures for your reference:

Format field
The output

However, I have just figured out another solution to this. I modified the code to the barcode reader, so my program will separate the product ID and the weight; abolishing the need to do it from the acumatica end! 


darylbowman
Captain II
Forum|alt.badge.img+13

Now that I see it, I'm not sure the format works if there is more than just numbers in the field. I believe you can also use the Format( ) method in your formula.

 

But if you found another way, good for you!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings