Skip to main content
Question

GI Formula If and Replace - Index Was outside the bounds of the array error.

  • November 2, 2022
  • 0 replies
  • 257 views

Forum|alt.badge.img

Good day, 

Below is a formula that i am trying to replace the Inventory ID with the line description for a specific Inventory item.  Replace part works.  I get a new field with the description but something is wrong with my IF statement.  I can an error from the system it is outside the array =

Index was outside the bounds of the array.

I would also rather then you the entire id but use the EZ start with; but can’t fine the correct formula.  In case the user decides to change the ID. 

=IIf( [POLine.InventoryID]=EX-99-ZZ-ZZ-ZZZZ06-ZZZ, Replace( [POLine.InventoryID], [POLine.InventoryID],[POLine.InventoryID_description],[POLine.InventoryID] ))


Your assistance is greatly appreciated.

Attached hew GI

Evan