Skip to main content

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:

pInventoryItem.InventoryID]<>Null

 

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

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

 

Thanks in advance!

Luke

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


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


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

 


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

oInventoryItem.InventoryID]<>''


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


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


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


Reply