AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
Getting Null values
 
Notifications
Clear all

Questions Getting Null values

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by prathyusha melapindi 8 years ago
6 Posts
3 Users
1 Reactions
8,007 Views
RSS
prathyusha melapindi
Posts: 15
 prathyusha melapindi
Topic starter
March 29, 2018 1:21 pm
(@prathyusha-melapindi)
Member
Joined: 8 years ago

ย I have a custom generic Inquiry created with multiple joins. I am trying to print all InventoryID's from inventoryItem table with multiple conditions. But the problem is only the Inventory ID's which are meeting the conditions are displayed. How do I get the Inventory Id's with other fields blank even though the conditions are not met?


5 Replies
MichaelHansen
Posts: 149
 MichaelHansen
March 29, 2018 6:40 pm
(@michaelhansen)
Estimable Member
Joined: 6 years ago

You need to do this on your joins and not on your conditions. Say I am left joining two tables: Inventory and OtherTable. The OtherTable only contains an inventory ID and field Letter which is either 'A' or 'B'. Your Join should be:

InventoryItem LEFT JOIN OtherTable

Your Join Conditions should be:

InventoryItem.InventoryIDย  ย  EQUALSย  ย  OtherTable.InventoryID

='A'ย  ย EQUALSย  ย  OtherTable.Letter

What this will do is output EVERY Inventory Item row and will attach the OtherTable row(s) that meets the criteria above (Letter = A & ID matches). For those Rows who FAIL to match the criteria, a NULL record will be inserted.

This is the output you're looking for. What the conditions page does is further refine this set. If the conditions page said OtherTable.Letter EQUALS ='A' then we would ONLY see the rows where this was true and not the null rows.

In short, move your conditions into your join and ensure you're NOT using inner joins (those don't create null records). Please go to the link below and look at the graphic, it explains what data is retained in a join.ย 

https://www.w3schools.com/sql/sql_join.asp ย 


Reply
prathyusha melapindi
 prathyusha melapindi
(@prathyusha-melapindi)
Joined: 8 years ago

Member
Posts: 15
March 30, 2018 3:14 pm
Reply toMichaelHansenMichaelHansen

Hi Michael. Thank you for your response.ย 

But i did use Left join and in the condition mentioned another one with ISNULL which gave the result with null values.


Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
March 29, 2018 9:41 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Right on @michael-hansen!ย  👍ย 


Reply
MichaelHansen
Posts: 149
 MichaelHansen
March 30, 2018 4:06 pm
(@michaelhansen)
Estimable Member
Joined: 6 years ago

Glad you got it working! The join will produce null fields. The conditions tab will take the table that is created from your join and only show what is requested in the conditions. So you can always choose to add "or isnull" to the condition OR you can just add the condition to the join and not place it in the conditions tab.


Reply
prathyusha melapindi
 prathyusha melapindi
(@prathyusha-melapindi)
Joined: 8 years ago

Member
Posts: 15
March 30, 2018 4:08 pm
Reply toMichaelHansenMichaelHansen

True either ways it works ๐Ÿ™‚


Reply
Tim Rodman reacted
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 23 Online
  • 2,386 Members
Our newest member: Tim Gaukroger
Latest Post: Pick List report suddenly not splitting on Shipment
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • Julie Baker Amy Foster
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright ยฉ 2025 ยท AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

โ€นโ€บร—

    โ€นโ€บร—