Solved

Adding Lot/Serial Number to AR Invoice AR641000 using IIF()

  • 18 April 2023
  • 2 replies
  • 138 views

Userlevel 5
Badge +1

I would like to add the Lot/Serial Number to AR Invoice AR641000 using an IIF()

Reason for using the IIF() is because I want to add a line break and ‘Serial Number: ‘ only if the the line item has a Lot/Serial Number. But it’s showing the (False) value regardless of if the item has a serial number allocated or not.

iif([ARTran.LotSerialNbr]=null, '', '{br}' + 'Serial Number: '+[ARTran.LotSerialNbr])

 

I’m not sure what is the problem. It’s like it thinks the line has a serial number even when it does not.

I am pretty sure the [ARTran.LotSerialNbr] is correct because when testing it added the correct serial number.

 

Any ideas?

icon

Best answer by kdavis45 18 April 2023, 01:32

View original

2 replies

Userlevel 5
Badge +1

@kdavis45 that worked, thank you!

Userlevel 4
Badge +1

Acumatica typically treats these fields as blank, rather than null - it’s an important distinction for these types of formulas.

  • Iif([ARTran.LotSerialNbr]=’’,’’,’{br}’ + ‘Serial Number: ‘ + [ARTran.LotSerialNbr])

If/when I’m unsure, I err on the side of caution and include both.

  • Iif(([ARTran.LotSerialNbr]=’’ or [ARTran.LotSerialNbr]=null),’’,’{br}’ + ‘Serial Number: ‘ + [ARTran.LotSerialNbr])

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