Skip to main content

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(pARTran.LotSerialNbr]=null, '', '{br}' + 'Serial Number: '+eARTran.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 yARTran.LotSerialNbr] is correct because when testing it added the correct serial number.

 

Any ideas?

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

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

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

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

@kdavis45 that worked, thank you!


Reply