Skip to main content
Solved

Evaluate Not Null

  • February 20, 2024
  • 7 replies
  • 309 views

Forum|alt.badge.img

Hello everyone,

What is the proper syntax in the Generic Inquiry builder to evaluate if the value of a field is not null?

 

For example if I want to evalute if Inventory Item Item ID is not null...

The following does not evalute correctly:

[InventoryItem.InventoryID]<>Null

 

The following does evaluate correctly, but looking for a more direct way:

=IIF(Isnull([InventoryItem.InventoryID],0)<>0,...)

 

Thanks in advance!

Luke

Best answer by darylbowman

Null is not the same as blank, although if one formula works as ‘null’, it seems like they both should. Try this:

[InventoryItem.InventoryID]<>''

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

7 replies

Forum|alt.badge.img+5
  • Captain II
  • 289 replies
  • February 20, 2024

You could try inventoryID>’’    -   that’s 2 single quotes.  I believe I’ve used this before.


Robert Sternberg
Captain II
Forum|alt.badge.img+7

InventoryID is a required field from a database level as it is the primary key.  Could you share more on your reasoning for this formula as it might not be needed? 

 

Your first formula is correct FIELD <> Null is a valid expression so once we know more about use case it will be easier to determine why you are not seeing the result you expect.  

Similarly for a generic inquiry you can use the conditions tab to indicate FIELD | IS NOT EMPTY


Forum|alt.badge.img
  • Author
  • Freshman I
  • 16 replies
  • February 21, 2024

I used InventoryID as a simple example.  My actual use case is a multi-level Kit Specification report where I am left joining KitSpecifcations on KitComponents.  I am using the null check to determine what level the component is on.

Here is an example evaluating using <>Null vs IsNull

 


darylbowman
Captain II
Forum|alt.badge.img+13
  • 1683 replies
  • Answer
  • February 21, 2024

Null is not the same as blank, although if one formula works as ‘null’, it seems like they both should. Try this:

[InventoryItem.InventoryID]<>''


Forum|alt.badge.img
  • Author
  • Freshman I
  • 16 replies
  • February 21, 2024

Thanks @darylbowman.  Agree that null is not the same as blank, but that does work in this context. 


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

It may be that IsNull checks for null or blank, whereas, an equality comparision to null will only check for null.


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

@lukef55 If this is resolved, would you mark it solved by checking the box on the best answer?


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