Skip to main content
Solved

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


Forum|alt.badge.img

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]=’ACand [InventoryItem.ItemType]='F'
=[InventoryItem.NotePopupText]<>'' and [InventoryItem.ItemStatus]=’ACand [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?

Best answer by darylbowman

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

View original
Did this topic help you find an answer to your question?

4 replies

darylbowman
Captain II
Forum|alt.badge.img+13

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


Forum|alt.badge.img
  • Author
  • Freshman II
  • 180 replies
  • June 8, 2023
darylbowman wrote:

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.


darylbowman
Captain II
Forum|alt.badge.img+13

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.


Forum|alt.badge.img
  • Author
  • Freshman II
  • 180 replies
  • June 13, 2023
darylbowman wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings