BPM Query Format

Patrick. (I feel your pain).

Observation: RMAHead.RMANum is an INTEGER. Initial value for a record is always zero (not null).

All those character tests you started with make sense as to why they fail (wrong TYPE).

That said, "for each RMAHead where RMAHead.RMANum = 99999" should have limited results to no records if you truly have no RMANum record value of 99999.

What happens if you try:

for each ttRMAHead no-lock where ttRMAHead.RMANum = 0Â
' that might catch a new record just in the process of being created

versus:

for each ttRMAHead no-lock where ttRMAHead.RMANum > 0
' that should at least find an established record. Whether it's the one you want, I don't know (probably not)...

Not following your intent.

????

RobÂ




________________________________
From: Patrick Parker <scrumbus@...>
To: vantage@yahoogroups.com
Sent: Thursday, June 18, 2009 5:29:11 PM
Subject: [Vantage] Re: BPM Query Format





I just don't get it.. it's got me frustrated to no end.

How can I stick in a condition of the following and have it meet the condition of more than 0 rows.

for each RMAHead where RMAHead.RMANum = 99999

Our RMA's are numbered up to 257, and yet this simple conditional query is somehow going through with true when there's no possible way.

ARRRRRRRRRRRRRRRGHH HHHHH

--- In vantage@yahoogroups .com, "Patrick Parker" <scrumbus@.. .> wrote:
>
> So.. I'm trying to do something that should be relatively simple and yet I'm having trouble.
>
> I have a BPM set up in RMAProc.Update to send an email when an RMA is created/updated. However it initially had no condition so was spewing a lot of empty alerts until data started to get entered.
>
> So.. I'm trying to build a condition to only send the alert when at least a few of the fields have data and I've hit the wall. I had an elaborate condition, now I'm trying to get a simple one functioning and nope.
>
> Why wouldn't any of these conditions always be true and return more than zero? I must be missing something.
>
> I tried the following:
>
> for each ttRMADtl no-lock where ttRMADtl.RMANum <> ?
> (looking for non-nulls)
>
> for each ttRMADtl no-lock where ttRMADtl.RMANum <> ''
> (looking for ANY RMA Detail lines)
>
> for each ttRMADtl no-lock where ttRMADtl.RMANum = '%RMAHead.RMANum% '
> (looking to maching the RMAHead RMANum being modified)
>
> for each RMADtl no-lock where RMADtl.RMANum = '%RMAHead.RMANum% '
> (not using the tt tables)
>
> for each RMAHead no-lock , each RMADtl no-lock where RMADtl.PartNum <> '' And RMADtl.Note <> '' and (RMAHead.Company = RMADtl.Company and RMAHead.RMANum = RMADtl.RMANum )
> (the elaborate one I initially started with from the editor)
>







[Non-text portions of this message have been removed]
So.. I'm trying to do something that should be relatively simple and yet I'm having trouble.

I have a BPM set up in RMAProc.Update to send an email when an RMA is created/updated. However it initially had no condition so was spewing a lot of empty alerts until data started to get entered.

So.. I'm trying to build a condition to only send the alert when at least a few of the fields have data and I've hit the wall. I had an elaborate condition, now I'm trying to get a simple one functioning and nope.

Why wouldn't any of these conditions always be true and return more than zero? I must be missing something.

I tried the following:

for each ttRMADtl no-lock where ttRMADtl.RMANum <> ?
(looking for non-nulls)

for each ttRMADtl no-lock where ttRMADtl.RMANum <> ''
(looking for ANY RMA Detail lines)

for each ttRMADtl no-lock where ttRMADtl.RMANum = '%RMAHead.RMANum%'
(looking to maching the RMAHead RMANum being modified)

for each RMADtl no-lock where RMADtl.RMANum = '%RMAHead.RMANum%'
(not using the tt tables)

for each RMAHead no-lock , each RMADtl no-lock where RMADtl.PartNum <> '' And RMADtl.Note <> '' and (RMAHead.Company = RMADtl.Company and RMAHead.RMANum = RMADtl.RMANum )
(the elaborate one I initially started with from the editor)
I just don't get it.. it's got me frustrated to no end.

How can I stick in a condition of the following and have it meet the condition of more than 0 rows.

for each RMAHead where RMAHead.RMANum = 99999

Our RMA's are numbered up to 257, and yet this simple conditional query is somehow going through with true when there's no possible way.

ARRRRRRRRRRRRRRRGHHHHHHH

--- In vantage@yahoogroups.com, "Patrick Parker" <scrumbus@...> wrote:
>
> So.. I'm trying to do something that should be relatively simple and yet I'm having trouble.
>
> I have a BPM set up in RMAProc.Update to send an email when an RMA is created/updated. However it initially had no condition so was spewing a lot of empty alerts until data started to get entered.
>
> So.. I'm trying to build a condition to only send the alert when at least a few of the fields have data and I've hit the wall. I had an elaborate condition, now I'm trying to get a simple one functioning and nope.
>
> Why wouldn't any of these conditions always be true and return more than zero? I must be missing something.
>
> I tried the following:
>
> for each ttRMADtl no-lock where ttRMADtl.RMANum <> ?
> (looking for non-nulls)
>
> for each ttRMADtl no-lock where ttRMADtl.RMANum <> ''
> (looking for ANY RMA Detail lines)
>
> for each ttRMADtl no-lock where ttRMADtl.RMANum = '%RMAHead.RMANum%'
> (looking to maching the RMAHead RMANum being modified)
>
> for each RMADtl no-lock where RMADtl.RMANum = '%RMAHead.RMANum%'
> (not using the tt tables)
>
> for each RMAHead no-lock , each RMADtl no-lock where RMADtl.PartNum <> '' And RMADtl.Note <> '' and (RMAHead.Company = RMADtl.Company and RMAHead.RMANum = RMADtl.RMANum )
> (the elaborate one I initially started with from the editor)
>