Solved

Visible Expression doesn't always work (Order Verification Report)

  • 8 June 2023
  • 4 replies
  • 65 views

Userlevel 5
Badge

Hi all, trying to hunt down an issue.

We have this value in our Inventory Item on our Order Verification Report:

=IIf([SOLine.InventoryID]<>Null, Format( '{0}: {1}', [SOLine.InventoryID],[SOLine.TranDesc]),[SOLine.TranDesc])

So far so good.

I duplicated it a few times as we want the item to be formatted with a different color depending on conditions. If it’s an inactive item, format red. Normal item, black. If it has a popup note, format it blue.

Items usually format as they should. But I’m having occasional issues where an item with no popup note is still formatting blue. Here are the visible expressions:

=[InventoryItem.NotePopupText]='' and [InventoryItem.ItemStatus]=’AC’ and [InventoryItem.ItemType]='F'
=[InventoryItem.NotePopupText]<>'' and [InventoryItem.ItemStatus]=’AC’ and [InventoryItem.ItemType]='F'
=[InventoryItem.ItemStatus]<>’AC’
=[InventoryItem.ItemType]='N'

The occasional items that format blue do not have a popup note (=’’), they are active (=’AC’) and are a finished good (=’F’). They should format black, but are still formatting as though the popup isn’t empty (<>’’).

Any thoughts?

icon

Best answer by darylbowman 8 June 2023, 22:22

View original

4 replies

Badge +11

I’m not certain this is a problem, but 

'

is not the same as this

I would make sure all the formulas use the first one

 

Another thing is that if a string were null, I believe this could be true

=[InventoryItem.NotePopupText]<>''

even though the string has no text

 

Maybe add a condition for equal or not equal to Null

Userlevel 5
Badge

I’m not certain this is a problem, but 

'

is not the same as this

I would make sure all the formulas use the first one

 

Another thing is that if a string were null, I believe this could be false

=[InventoryItem.NotePopupText]<>''

and this could also be false

[InventoryItem.NotePopupText]=''

 

Maybe add a condition for equal or not equal to Null

Ahhhh great catch on the straight vs curly quote!

 

And the formatting should be

=[InventoryItem.NotePopupText]=NULL

and

=[InventoryItem.NotePopupText]<>NULL

 

correct? I always screw up by using IS NULL. Bad habit.

This corrected the issue (I think) but may have caused another, still checking. Thanks so much for your help.

Badge +11

I was suggesting to check for Null in addition to checking for an empty string. But yes, the format is correct. You could use IsNull to set it to an empty string when it's null and then check for an empty string.

Userlevel 5
Badge

I was suggesting to check for Null in addition to checking for an empty string. But yes, the format is correct. You could use IsNull to set it to an empty string when it's null and then check for an empty string.

Sorry for the late Best Answer Daryl, your suggestion did the trick!

=[InventoryItem.NotePopupText]<>NULL and [InventoryItem.NotePopupText]<>''

Adding both is not null and is not empty worked!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved