Help with BPM Code

Yes, here is an Answerbook that can explain.


14418MPS



________________________________
From: Ken Williams <kwilliams@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, May 9, 2013 12:07 PM
Subject: RE: [Vantage] Help with BPM Code


Thanks for the heads up Ted, I'll do that. Is that what was keeping the assign from working?

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ted Koch
Sent: Thursday, May 09, 2013 6:27 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Help with BPM Code



If you are going to update a record, use EXCLUSIVE-LOCK on that table.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID EXCLUSIVE-LOCK.

ASSIGN JOBHEAD_UD.CHECKBOX23 = TRUE.

end.

________________________________
From: Ken Williams <kwilliams@...<mailto:kwilliams%40intermountainelectronics.com>>
To: "vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>" <vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>>
Sent: Wednesday, May 8, 2013 7:54 PM
Subject: RE: [Vantage] Help with BPM Code


Cathy you were on the right track, thanks for the suggestion. I ended up getting it working like below. The strange thing is I couldn't get "assign jobhhead_ud.checkbox23 = true" to work, I had to use the updatetablebuffer method.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID no-lock.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).

end.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Cathy
Sent: Wednesday, May 08, 2013 2:53 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Help with BPM Code

Not sure what Method Directive you are using but, try

After your define statement -

For each ttLaborDtl where ttLaborDtl.rowmod = 'A' or ttLaborDtl.rowmod = 'U'
no-lock. (not sure if you need the Add or Update criteria).

I think you will need another End statement.

If you are only getting Test and not the ttLaborDtl.JobNum - it might need
to know what record you need to find JobHead.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 1:12 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Help with BPM Code

Great suggestion. Unfortunately that made no difference...I still get "Test"
and nothing else... what's interesting is that if I try to publish what's in
any ttLaborDtl record I get nothing, the following code for example. I know
that ttLaborDtl.JobNum is valid because I can do a show informational box in
addition to the custom code and it returns the job number.

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = ttLaborDtl.JobNum.
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock:

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID
no-lock:

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On
Behalf Of Cathy
Sent: Wednesday, May 08, 2013 1:13 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ;
epicor9@...<mailto:epicor9%40list.epicorusers.org><mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
Subject: RE: [Vantage] Help with BPM Code

I had a problem with the For Each and was receiving errors and received
help in this forum.

What I was given is below in the code I submitted.

The For Each is a loop and needs a colon -

Not sure if this is what you are looking for -

*******************************************************************

FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>] On
Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...<mailto:epicor9%40list.epicorusers.org><mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
<mailto:epicor9%40list.epicorusers.org>; vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Help with BPM Code

I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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

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

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

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

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

------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links

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



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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
I'm trying to update an extended UD field on JobHead_UD based on activity that happens when an employee jobs out (LaborDtl). I'm applying the following code to a LaborDtl In Transaction Data Directive (and I've tried Standard as well). It seems to be failing at my "for each" - I get the first "Test" message but I then get nothing after. If I change "for each" to "find first" and drop the "end", I get the other text message boxes but not the one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum is valid within the BPM by using a "show informational message" and popping up the field, I've stared at this for way to long...


define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID) no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.


RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.


Appreciate any help you can offer,
Ken


[Non-text portions of this message have been removed]
I think you need a FOR EACH on the ttLaborDtl table too.

Brenda

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ken Williams
Sent: Wednesday, May 08, 2013 2:47 PM
To: epicor9@...; vantage@yahoogroups.com
Subject: [Vantage] Help with BPM Code



I'm trying to update an extended UD field on JobHead_UD based on activity that happens when an employee jobs out (LaborDtl). I'm applying the following code to a LaborDtl In Transaction Data Directive (and I've tried Standard as well). It seems to be failing at my "for each" - I get the first "Test" message but I then get nothing after. If I change "for each" to "find first" and drop the "end", I get the other text message boxes but not the one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum is valid within the BPM by using a "show informational message" and popping up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID) no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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



[Non-text portions of this message have been removed]
For extended UD tables I've had similar problems, and was never able to figure out why.

My work around was that I created a ABL code where in the end it would set ttCallContextBpmData.Character01 to the value I needed.
Then I use the action "Set the specified field of the changed row to the specific expression".

Where the specified field is the extended UD field, it does show up on the list of fields for that table.
And the specific expression is ttCallContextBpmData.Character01

Then one more action to clear the ttCallContextBpmData.Character01 value.


Marco Vissuet
Systems Engineer
Pacific Contours Corporation
Cell (619)507-2311
Anaheim Office (714) 693-1260
San Diego Office (619)670-3900
Fax (714) 693-1252
mvissuet@...<mailto:marcov@...>
http://www.pacificcontours.com/

"The information contained herein may be subject to the International Traffic in Arms Regulations (ITAR) Warning: - This document contains data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq.) as amended, or the Export Administration Act (Title 50, U.S.C., App 2401 et seq.) as amended. Violations of these export laws are subject to severe criminal and civil penalties. Disseminate in accordance with provisions of DoD Directive 5230.25.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...; vantage@yahoogroups.com
Subject: [Vantage] Help with BPM Code



I'm trying to update an extended UD field on JobHead_UD based on activity that happens when an employee jobs out (LaborDtl). I'm applying the following code to a LaborDtl In Transaction Data Directive (and I've tried Standard as well). It seems to be failing at my "for each" - I get the first "Test" message but I then get nothing after. If I change "for each" to "find first" and drop the "end", I get the other text message boxes but not the one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum is valid within the BPM by using a "show informational message" and popping up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID) no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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



__________ Information from ESET NOD32 Antivirus, version of virus signature database 8310 (20130508) __________


The message was checked by ESET NOD32 Antivirus.


http://www.eset.com


[Non-text portions of this message have been removed]
I had a problem with the For Each and was receiving errors and received
help in this forum.



What I was given is below in the code I submitted.



The For Each is a loop and needs a colon -



Not sure if this is what you are looking for -



*******************************************************************



FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...; vantage@yahoogroups.com
Subject: [Vantage] Help with BPM Code





I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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





[Non-text portions of this message have been removed]
Great suggestion. Unfortunately that made no difference...I still get "Test" and nothing else... what's interesting is that if I try to publish what's in any ttLaborDtl record I get nothing, the following code for example. I know that ttLaborDtl.JobNum is valid because I can do a show informational box in addition to the custom code and it returns the job number.


define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = ttLaborDtl.JobNum.
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock:

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID no-lock:

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.


RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Cathy
Sent: Wednesday, May 08, 2013 1:13 PM
To: vantage@yahoogroups.com; epicor9@...
Subject: RE: [Vantage] Help with BPM Code



I had a problem with the For Each and was receiving errors and received
help in this forum.

What I was given is below in the code I submitted.

The For Each is a loop and needs a colon -

Not sure if this is what you are looking for -

*******************************************************************

FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...<mailto:epicor9%40list.epicorusers.org>; vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Help with BPM Code

I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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

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



[Non-text portions of this message have been removed]
Not sure what Method Directive you are using but, try



After your define statement -



For each ttLaborDtl where ttLaborDtl.rowmod = 'A' or ttLaborDtl.rowmod = 'U'
no-lock. (not sure if you need the Add or Update criteria).



I think you will need another End statement.



If you are only getting Test and not the ttLaborDtl.JobNum - it might need
to know what record you need to find JobHead.





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 1:12 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Help with BPM Code





Great suggestion. Unfortunately that made no difference...I still get "Test"
and nothing else... what's interesting is that if I try to publish what's in
any ttLaborDtl record I get nothing, the following code for example. I know
that ttLaborDtl.JobNum is valid because I can do a show informational box in
addition to the custom code and it returns the job number.

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = ttLaborDtl.JobNum.
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock:

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID
no-lock:

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of Cathy
Sent: Wednesday, May 08, 2013 1:13 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ;
epicor9@... <mailto:epicor9%40list.epicorusers.org>
Subject: RE: [Vantage] Help with BPM Code

I had a problem with the For Each and was receiving errors and received
help in this forum.

What I was given is below in the code I submitted.

The For Each is a loop and needs a colon -

Not sure if this is what you are looking for -

*******************************************************************

FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>] On
Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@... <mailto:epicor9%40list.epicorusers.org>
<mailto:epicor9%40list.epicorusers.org>; vantage@yahoogroups.com
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Help with BPM Code

I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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

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

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





[Non-text portions of this message have been removed]
Cathy you were on the right track, thanks for the suggestion. I ended up getting it working like below. The strange thing is I couldn't get "assign jobhhead_ud.checkbox23 = true" to work, I had to use the updatetablebuffer method.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID no-lock.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).

end.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Cathy
Sent: Wednesday, May 08, 2013 2:53 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Help with BPM Code



Not sure what Method Directive you are using but, try

After your define statement -

For each ttLaborDtl where ttLaborDtl.rowmod = 'A' or ttLaborDtl.rowmod = 'U'
no-lock. (not sure if you need the Add or Update criteria).

I think you will need another End statement.

If you are only getting Test and not the ttLaborDtl.JobNum - it might need
to know what record you need to find JobHead.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 1:12 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Help with BPM Code

Great suggestion. Unfortunately that made no difference...I still get "Test"
and nothing else... what's interesting is that if I try to publish what's in
any ttLaborDtl record I get nothing, the following code for example. I know
that ttLaborDtl.JobNum is valid because I can do a show informational box in
addition to the custom code and it returns the job number.

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = ttLaborDtl.JobNum.
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock:

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID
no-lock:

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On
Behalf Of Cathy
Sent: Wednesday, May 08, 2013 1:13 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ;
epicor9@...<mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
Subject: RE: [Vantage] Help with BPM Code

I had a problem with the For Each and was receiving errors and received
help in this forum.

What I was given is below in the code I submitted.

The For Each is a loop and needs a colon -

Not sure if this is what you are looking for -

*******************************************************************

FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>] On
Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...<mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
<mailto:epicor9%40list.epicorusers.org>; vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Help with BPM Code

I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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

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

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

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



[Non-text portions of this message have been removed]
If you are going to update a record, use EXCLUSIVE-LOCK on that table.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID EXCLUSIVE-LOCK.

ASSIGN JOBHEAD_UD.CHECKBOX23 = TRUE.

end.




________________________________
From: Ken Williams <kwilliams@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Wednesday, May 8, 2013 7:54 PM
Subject: RE: [Vantage] Help with BPM Code


Cathy you were on the right track, thanks for the suggestion. I ended up getting it working like below. The strange thing is I couldn't get "assign jobhhead_ud.checkbox23 = true" to work, I had to use the updatetablebuffer method.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID no-lock.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).

end.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Cathy
Sent: Wednesday, May 08, 2013 2:53 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Help with BPM Code



Not sure what Method Directive you are using but, try

After your define statement -

For each ttLaborDtl where ttLaborDtl.rowmod = 'A' or ttLaborDtl.rowmod = 'U'
no-lock. (not sure if you need the Add or Update criteria).

I think you will need another End statement.

If you are only getting Test and not the ttLaborDtl.JobNum - it might need
to know what record you need to find JobHead.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 1:12 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Help with BPM Code

Great suggestion. Unfortunately that made no difference...I still get "Test"
and nothing else... what's interesting is that if I try to publish what's in
any ttLaborDtl record I get nothing, the following code for example. I know
that ttLaborDtl.JobNum is valid because I can do a show informational box in
addition to the custom code and it returns the job number.

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = ttLaborDtl.JobNum.
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock:

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID
no-lock:

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On
Behalf Of Cathy
Sent: Wednesday, May 08, 2013 1:13 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ;
epicor9@...<mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
Subject: RE: [Vantage] Help with BPM Code

I had a problem with the For Each and was receiving errors and received
help in this forum.

What I was given is below in the code I submitted.

The For Each is a loop and needs a colon -

Not sure if this is what you are looking for -

*******************************************************************

FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>] On
Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...<mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
<mailto:epicor9%40list.epicorusers.org>; vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Help with BPM Code

I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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

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

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

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



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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
Thanks for the heads up Ted, I'll do that. Is that what was keeping the assign from working?

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ted Koch
Sent: Thursday, May 09, 2013 6:27 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Help with BPM Code



If you are going to update a record, use EXCLUSIVE-LOCK on that table.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID EXCLUSIVE-LOCK.

ASSIGN JOBHEAD_UD.CHECKBOX23 = TRUE.

end.

________________________________
From: Ken Williams <kwilliams@...<mailto:kwilliams%40intermountainelectronics.com>>
To: "vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>" <vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>>
Sent: Wednesday, May 8, 2013 7:54 PM
Subject: RE: [Vantage] Help with BPM Code


Cathy you were on the right track, thanks for the suggestion. I ended up getting it working like below. The strange thing is I couldn't get "assign jobhhead_ud.checkbox23 = true" to work, I had to use the updatetablebuffer method.

for first ttLaborDtl no-lock:

find first JobHead where (ttLaborDtl.Company = JobHead.Company and ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

find first JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID no-lock.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE, 'Checkbox23',True).

end.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Cathy
Sent: Wednesday, May 08, 2013 2:53 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Help with BPM Code

Not sure what Method Directive you are using but, try

After your define statement -

For each ttLaborDtl where ttLaborDtl.rowmod = 'A' or ttLaborDtl.rowmod = 'U'
no-lock. (not sure if you need the Add or Update criteria).

I think you will need another End statement.

If you are only getting Test and not the ttLaborDtl.JobNum - it might need
to know what record you need to find JobHead.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 1:12 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Help with BPM Code

Great suggestion. Unfortunately that made no difference...I still get "Test"
and nothing else... what's interesting is that if I try to publish what's in
any ttLaborDtl record I get nothing, the following code for example. I know
that ttLaborDtl.JobNum is valid because I can do a show informational box in
addition to the custom code and it returns the job number.

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = ttLaborDtl.JobNum.
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock:

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD where JobHead.SysRowID = JobHead_UD.ForeignSysRowID
no-lock:

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On
Behalf Of Cathy
Sent: Wednesday, May 08, 2013 1:13 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ;
epicor9@...<mailto:epicor9%40list.epicorusers.org><mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
Subject: RE: [Vantage] Help with BPM Code

I had a problem with the For Each and was receiving errors and received
help in this forum.

What I was given is below in the code I submitted.

The For Each is a loop and needs a colon -

Not sure if this is what you are looking for -

*******************************************************************

FOR EACH ShipUPS where ShipUPS.Company = ttShipHead.Company
and ShipUPS.PackNum =ttShipHead.PackNum no-lock
: /* <- put a colon here. */

/* do stuff for each ShipUPS here */

END. /* End the FOR EACH loop with an end statement (don't forget the
period) */

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>] On
Behalf Of
Ken Williams
Sent: Wednesday, May 08, 2013 11:47 AM
To: epicor9@...<mailto:epicor9%40list.epicorusers.org><mailto:epicor9%40list.epicorusers.org> <mailto:epicor9%40list.epicorusers.org>
<mailto:epicor9%40list.epicorusers.org>; vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Help with BPM Code

I'm trying to update an extended UD field on JobHead_UD based on activity
that happens when an employee jobs out (LaborDtl). I'm applying the
following code to a LaborDtl In Transaction Data Directive (and I've tried
Standard as well). It seems to be failing at my "for each" - I get the first
"Test" message but I then get nothing after. If I change "for each" to "find
first" and drop the "end", I get the other text message boxes but not the
one with the UD.ForeignSysRowID. I've also verified that ttLaborDtl.JobNum
is valid within the BPM by using a "show informational message" and popping
up the field, I've stared at this for way to long...

define var Msg as character no-undo.

assign Msg = "Test".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead where (ttLaborDtl.Company = JobHead.Company and
ttLaborDtl.JobNum = JobHead.JobNum) no-lock.

assign Msg = "Test2".
{lib/publishinfomsg.i &infomsg = Msg}.

for each JobHead_UD (where JobHead_UD.ForeignSysRowID = JobHead.SysRowID)
no-lock.

assign Msg = "Result of Checkbox23 ".
{lib/publishinfomsg.i &infomsg = Msg}.

assign Msg = JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

RUN LIB\UpdateTableBuffer.p(input buffer JobHead_UD:HANDLE,
'Checkbox23',True).
assign JobHead_UD.CheckBox23 = true.

assign Msg = "Result of Checkbox23 " + JobHead_UD.ForeignSysRowID.
{lib/publishinfomsg.i &infomsg = Msg}.

end.
end.

Appreciate any help you can offer,
Ken

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

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

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

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

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

------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links

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



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