E9.04: BPM condition to check related databases table

Turns out ttOrderHed (and OrderHed) has a field called OrderAmt which
has the value I'm looking for.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Joe Rojas
Sent: Sunday, July 10, 2011 2:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] E9.04: BPM condition to check related databases table





Hello,

I trying to create a BPM that sets a user defined checkbox only when the
order is taken off of hold and only if the sales order does not have
zero dollar total.

The challenge I'm having is that the when OrderHed.OrderHeld is changed,
all the OrderDtl lines would have already been saved to the database so
the ttOrderDtl table will be empty so that I cannot check their dollar
value.

I am forced to write a query that checks the database table OrderDtl but
when using the Query Designer how would I write the query so that I can
access ttOrderHed.OrderNum?

If I were doing it in ABL it would look like this:

For each ttOrderHed where ttOrderHed.RowMod = "U":

If CAN-FIND(OrderHed where OrderHed.Company =
ttOrderHed.Company AND OrderHed.OrderNum = ttOrderHed.OrderNum)

Do something

End.

How would I (can I?) write this in the query designer so that I can have
a condition that says "if query designed has not more than 0 rows"?

Or am I force to write ABL code?







Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... <mailto:jrojas%40matsinc.com> | www.matsinc.com Ask
us about our clean, green and beautiful matting and flooring

This message is intended only for the individual named. If you are not
the named addressee you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately by e-mail if you have
received this e-mail by mistake. Please note that any views or opinions
presented in this email are solely those of the author and do not
necessarily represent those of the company.

[Non-text portions of this message have been removed]












Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring


This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


[Non-text portions of this message have been removed]
Hello,



I trying to create a BPM that sets a user defined checkbox only when the
order is taken off of hold and only if the sales order does not have
zero dollar total.



The challenge I'm having is that the when OrderHed.OrderHeld is changed,
all the OrderDtl lines would have already been saved to the database so
the ttOrderDtl table will be empty so that I cannot check their dollar
value.

I am forced to write a query that checks the database table OrderDtl but
when using the Query Designer how would I write the query so that I can
access ttOrderHed.OrderNum?



If I were doing it in ABL it would look like this:

For each ttOrderHed where ttOrderHed.RowMod = "U":

If CAN-FIND(OrderHed where OrderHed.Company =
ttOrderHed.Company AND OrderHed.OrderNum = ttOrderHed.OrderNum)

Do something

End.



How would I (can I?) write this in the query designer so that I can have
a condition that says "if query designed has not more than 0 rows"?

Or am I force to write ABL code?










Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring


This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


[Non-text portions of this message have been removed]