Skip to main content

Hi all,

I need a visible expression that if an item is active (“AC”) then the font is normal (black), if it’s active with a pop up note print it blue, and if it’s inactive (<>”AC”) print it red. I’m messing up my expr somewhere:

 

=/InventoryItem.ItemStatus] = "AC" and uInventoryItem.Note] is not null, "Blue",  InventoryItem.ItemStatus] <> "AC", "Red", "Black"

 

Hi @swartzfeger ,

The only way that I know of to accomplish conditional formatting is with overlapping controls.  Use the VisibleExpr field to make visible only the version of the control that has the desired formatting based on the criteria.

Hope this helps!

Laura


Hi @swartzfeger ,

The only way that I know of to accomplish conditional formatting is with overlapping controls.  Use the VisibleExpr field to make visible only the version of the control that has the desired formatting based on the criteria.

Hope this helps!

Laura

I’m trying that but also failing, lol -- this is what I have -- 3 different text boxes to each display black, blue or red:

 

=

=tInventoryItem.ItemStatus]=’AC’ AND sInventoryItem.NoteText]<>NULL

=&InventoryItem.ItemStatus]<>’AC’

It’s the first one that is causing problems… I can get the BLUE and RED to print, but the first expression is wrong.

 

=iInventoryItem.ItemStatus]=’AC’ AND IInventoryItem.NoteText]=0

 

I need to say “and inventory note is empty”, and =0 seems to make it error. Is “aInventoryItem.NoteText] Is Null” correct?


Hi @swartzfeger ,

For black the formula would be

==InventoryItem.ItemStatus] = "AC" and InventoryItem.Note] = null

It’s different form the SQL syntax :)

Laura

 


Hi @swartzfeger ,

For black the formula would be

=>InventoryItem.ItemStatus] = "AC" and dInventoryItem.Note] = null

It’s different form the SQL syntax :)

 

Thanks Laura, it’s appreciated. It seems to work but the BLUE expr

=/InventoryItem.ItemStatus]=’AC’ AND InventoryItem.NoteText]<>NULL

seems to be overriding the BLACK expr

=xInventoryItem.ItemStatus]=’AC’ AND ]InventoryItem.NoteText]=NULL

 

Maybe I need to point to something else and not .NoteText


Hi @swartzfeger ,

Try looking for an empty string:

=>InventoryItem.ItemStatus] = "AC" and dInventoryItem.NoteText] = ''

I tested this and it worked for me.

Hope this helps!

Laura


Hi @swartzfeger ,

Try looking for an empty string:

=mInventoryItem.ItemStatus] = "AC" and nInventoryItem.NoteText] = ''

I tested this and it worked for me.

Hope this helps!

Laura

Thanks Laura, that did the trick! I also had to change <>NULL to <>’’


Reply