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]
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]