Solved

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

  • 5 April 2023
  • 5 replies
  • 144 views

Userlevel 2

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 :)

 

icon

Best answer by lightman 6 April 2023, 08:35

View original

5 replies

Badge +11

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

Userlevel 2

@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

Badge +11

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

Userlevel 2

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! 

Badge +11

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved