Skip to main content
Answer

Report Writer VisibleExpr for displaying text field

  • April 11, 2023
  • 2 replies
  • 132 views

Forum|alt.badge.img

Hi all,

 

I think I’m screwing up my VisibleExpr -- If an InventoryID contains ‘SIM’, I want it to display a text field, but I think I messed up the syntax as I’m getting an error.

 

=IIf( InStr( [AMProdItem.InventoryID], 'SIM' )<0, False )

 

Is there a better way to define ‘contains’ in the expression?

Best answer by lauraj46

Hi @swartzfeger ,

In your expression you are missing the False argument.  I think it should be something like this:

=IIf( InStr( [AMProdItem.InventoryID], 'SIM' )<0, False, True )

Hope this helps!

Laura

2 replies

lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • Answer
  • April 11, 2023

Hi @swartzfeger ,

In your expression you are missing the False argument.  I think it should be something like this:

=IIf( InStr( [AMProdItem.InventoryID], 'SIM' )<0, False, True )

Hope this helps!

Laura


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 12, 2023

Hi @swartzfeger ,

In your expression you are missing the False argument.  I think it should be something like this:

=IIf( InStr( [AMProdItem.InventoryID], 'SIM' )<0, False, True )

Hope this helps!

Laura

Sorry for the late reply Laura but your expression was perfect. I definitely need to read up on expressions so I can learn to parse these better and recognize errors more quickly!