Hi everyone,
I'm trying to write a formula in Acumatica Report Designer where:
-
If
[CWMSAItemAttributes.Brand]is empty or null, I want to return the first word from[InventoryItem.Descr]. -
Otherwise, it should return the value from
[CWMSAItemAttributes.Brand].
I’ve tried using IndexOf() and Substring(), but I keep getting errors like “index out of range” or “missing operator before the space operand” depending on how I write it.
Please guide me .
Here’s one of the formulas I attempted:
=IIf( Len(Trim([CWMSAItemAttributes.Brand])) = 0, Substring([InventoryItem.Descr], 0, IndexOf([InventoryItem.Descr], ' ')), [CWMSAItemAttributes.Brand] )