Tony,
It is not the IF working against the Null - rather the IF works
against anything but a NULL > 0, = 0 or < 0). It is the ELSE that is
functioning against a NULL.
Glad it worked for you,
NB
It is not the IF working against the Null - rather the IF works
against anything but a NULL > 0, = 0 or < 0). It is the ELSE that is
functioning against a NULL.
Glad it worked for you,
NB
--- In vantage@yahoogroups.com, Tony Hughes <thughes281@...> wrote:
>
> I had the outer join correctly, thank you.
> your IF works, I am surprised that it works, the >, = or < should
not work against a NULL.
> But at this point I won't argue with it!
>
> Thank you to all for the help.
>
> Tony
>
>
>
>
>
> ________________________________
> From: bonner.nathan <bonner.n@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, December 10, 2008 8:05:34 AM
> Subject: [Vantage] Re: BAQ calculated field syntax
>
>
> IF partbin.onhandqty > 0 OR partbin.onhandqty = 0 OR
> partbin.onhandqty < 0
> THEN PartPlant.MinimumQt y - (PartBin.OnhandQty -
PartPlant.AllocQty)
> ELSE PartPlant.MinimumQt y
>
> The formula, as it is written in the example, is looking for any
> value being returned from PartBin.OnhandQty. Remove as many of the
> OR statememnts as needed to get the behavior you are looking for.
>
> If your BAQ Table join utilizes an inner join to PartBin you will
> never get true NULL values (blank fields rather than just "0")
> retuned. Be sure to mark your join as an OUTER JOIN if you are
> interested in seeing all your parts regardless of whether you have
> any in a PartBin or not.
>
> Check the field names used in this example as they are taken
straight
> from your sample and have not been verified against the database
> schema (as I recall some of the actual field names are different
from
> those used here).
>
> --- In vantage@yahoogroups .com, Tony Hughes <thughes281@ ...>
wrote:
> >
> > what I am trying to do is show the partplant and a simple "your
> minimum is 5, you have 3, suggest you order 2" BAQ.
> > If I have a formula, like below: partplant.minimumqt y -
> (partbin.onhandqty - partplant.allocqty) , this will be null if
> there's no partbin record. So if your partplant minimum is 5, you
> have zero on hand, the suggested reorder box is NULL, not 5.
> >
> > I hope this makes more sense.
> >
> > Tony
> >
> >
> >
> >
> > ____________ _________ _________ __
> > From: Robert Brown <robertb_versa@ ...>
> > To: vantage@yahoogroups .com
> > Sent: Tuesday, December 9, 2008 10:04:45 PM
> > Subject: Re: [Vantage] BAQ calculated field syntax
> >
> >
> > Cheap easy way? Compare partbin.onhandqty to an UNUSED numeric ud
> field (like .Number01) in partbin to determine if onhandqty is null.
> >
> > Looking at the premise, I question the need. Vantage doesn't
> maintain a partbin record for if a whse/bin o/h qty has fallen to
> zero.
> >
> > You won't have a row/column to even evaluate (depending upon how
> you've constructed your multi-table joins).
> >
> > Rob
> >
> > --- On Tue, 12/9/08, Tony Hughes <thughes281@ yahoo. com> wrote:
> >
> > From: Tony Hughes <thughes281@ yahoo. com>
> > Subject: [Vantage] BAQ calculated field syntax
> > To: vantage@yahoogroups .com
> > Date: Tuesday, December 9, 2008, 9:27 AM
> >
> > Would anyone have any experience with the syntax of a calculated
> field in a BAQ?
> >
> > The logic is this:
> >
> > IF field IS NULL THEN
> > formula A
> > ELSE
> > formula B
> > END IF
> >
> > Specifically:
> > if partbin.onhandqty is null then
> > return partplant.minimumqt y
> > else
> > return partplant.minimumqt y - (partbin.onhandqty -
> partplant.allocqty)
> > end if
> >
> > what I'm not having luck with is the Null part. the first part of
> the if statement should trigger when there is no partbin record at
> all.
> >
> > Thanks for any help
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>