Solved

Generic Inquiry: Return substring from a currency value (remove auto-inserted trailing 00s)

  • 15 April 2021
  • 2 replies
  • 408 views

Userlevel 2
Badge

The mission with this generic inquiry is to show the payment amount value with the decimal stripped out. I’ve tried a few formulas but Acumatica seems to want to add 2 trailing 0s when I do that. 

Example:

 

 

The goal is, instead of showing $8321.05, to show:  832105

In SQL I’d want to return a substring, or trim 2 characters from the right side of the string. Here are a few examples of what I’ve tried:

 

  • Try to get the field to display as a schema field ‘payment amount’
  • Try to get the field to display as schema field ‘doc description’
  • Try to return from the right side of the string, -2 positions: =Right(CStr( Replace(  [APPayment.CuryOrigDocAmt], '.' , '' ) ), -2)
  • Try to cast the field as a decimal =Replace(  CDec([APPayment.CuryOrigDocAmt]), '.' , '' )
  • Try to cast the field as a string  =Replace(  CStr([APPayment.CuryOrigDocAmt]), '.' , '' )

 

Any suggestions on this? Acumatica really seems to want to add those zeroes!

icon

Best answer by Neil Cantral 15 April 2021, 21:14

View original

2 replies

Userlevel 5
Badge +3

I typically use an int field like LineCntr anytime I don’t want to deal with decimals. Below is how I would do the implied decimal for the Payment Amt.

 

 

Userlevel 2
Badge

@Neil Cantral Ooh. That did it. Nice data manipulation. Thank you for showing your work! I’m back in business now. 

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