Skip to main content
Answer

Visible Expression for string inside of InventoryID

  • November 7, 2023
  • 2 replies
  • 82 views

Forum|alt.badge.img

Hi all,

 

I need a VisibleExpr that flips visibility based on a string inside of our InventoryID -- if an InventoryID contains “-STRING-”, then flip this text on.

 

=iif(([AMProdItem.InventoryID]='-STRING-'),false,true)

 

Unfortunately, I don’t know how to write the query so I’m asking if it CONTAINS, not EQUALS.

How do I craft the query to see if the InventoryID contains ‘-STRING-’?

Best answer by jinin

Hi @swartzfeger ,

 

Could you try like the below,

IIf(InStr([AMProdItem.Descr], '-STRING-') > 0, True, False)

2 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • Answer
  • November 7, 2023

Hi @swartzfeger ,

 

Could you try like the below,

IIf(InStr([AMProdItem.Descr], '-STRING-') > 0, True, False)


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • November 7, 2023

Hi all,

 

I need a VisibleExpr that flips visibility based on a string inside of our InventoryID -- if an InventoryID contains “-STRING-”, then flip this text on.

 

=iif(([AMProdItem.InventoryID]='-STRING-'),false,true)

 

Unfortunately, I don’t know how to write the query so I’m asking if it CONTAINS, not EQUALS.

How do I craft the query to see if the InventoryID contains ‘-STRING-’?

Perfect Jini, thank you! I’m not familiar with C# but InStr makes sense now… thank you!