Date field update w/BPM

Nigel,

I am back from holiday and ready to tackle this again.

I did copy/paste your code exactly. There is nothing in the server
log. When I commented out Run lib comand, I still get the same errors.

The only new tidbit is that the OrderDtl.Date10 field seems to be
getting populated as desired. Of course since the error basically
kills Vantage, that is little consolation.

Andrew
--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...> wrote:
>
> Is there any message in the mfgtest803.server.log (or
> mfgsys803.server.log if you're on the live db)? It's in
> \\server\epicor\mfgsys803\server\logs.
>
> Did you copy/paste my code? I've just tried it again and it works for
> me. Try commenting out the "Run lib\..." statement to see if that's
> the cause - put a /* before the line and */ at the end of the line -
> the line should turn green. Save it and trigger it and see what
> happens.
>
> Nigel.
>
>
>
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > Problems again. I wish I understood this better so I could help
> > myself, but until then....
> >
> > When I tried the new code I got two Application Error messages. The
> > first is..
> >
> > Error Detail
> > ============
> > 7175
> >
> >
> > Stack Trace
> > ===========
> > at Progress.Open4GL.DynamicAPI.Session.runProcedure(String
> > requestID, String procedureName, ParameterSet parms, Boolean
> > persistent, Boolean internal_Renamed, Int64 procId, MetaSchema
> > localSchema, Int32 stateModel)
> > at Progress.Open4GL.DynamicAPI.Session.runStatelessProcedure
> (String
> > requestID, String fullProcedureName, ParameterSet inparams, Object
> > procId, MetaSchema localSchema, Int32 stateModel)
> > at
> > Progress.Open4GL.DynamicAPI.PersistentProc.runTheProcedure(String
> > requestID, String procedureName, ParameterSet parms, MetaSchema
> schema)
> > at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String
> > procedureName, ParameterSet parms, MetaSchema schema)
> > at Epicor.Mfg.Proxy.SalesOrderImpl.Update(SalesOrderDataSet ds)
> > at Epicor.Mfg.UI.Adapters.SalesOrderAdapter.Update()
> > at Epicor.Mfg.UI.App.SalesOrderEntry.Transaction.Update()
> >
> > The second one is..
> >
> > Error Detail
> > ============
> > Tried to call a method in an invalid procedure. (7224)
> >
> >
> > Stack Trace
> > ===========
> > at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String
> > procedureName, ParameterSet parms, MetaSchema schema)
> > at Epicor.Mfg.Proxy.ReportMonitorImpl.GetRowsKeepIdleTime(String
> > whereClauseSysRptLst, Int32 pageSize, Int32 absolutePage, Boolean&
> > morePages)
> > at
> > Epicor.Mfg.UI.Adapters.ReportMonitorAdapter.GetRowsKeepIdleTime
> (SearchOptions
> > opts, Boolean& MorePages)
> >
> > They pretty much kill the Vantage session.
> >
> > Any Ideas?
> >
> > Andrew
> >
> > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > >
> > > I will try that. Thank you for the (always) great help.
> > >
> > > Just one more question for my own education. Does the Update bo
> only
> > > make temp tables for tables that have been changed? So since I was
> > > only making a change to the OrderHed table, then there was no
> > > ttOrderDtl tables generated. This would be one of those key
> nuggets of
> > > knowledge about how BPMs and BOs that would be really helpful to
> > > understand for the future.
> > >
> > > Thanks again.
> > >
> > > Andrew
> > >
> > > --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
> wrote:
> > > >
> > > > I've just re-read your earlier posts and seen your mention of
> > > > "existing orders". Sorry, hadn't noticed it before.
> > > >
> > > > Yes, it's possible but there is a complication. You need
> something to
> > > > "kick-off" the BPM, something that has the OrderNum. Problem is
> that
> > > > all your orders are already entered. So you would have to open
> each
> > > > order, tick a box/make a change and save the order. This would
> then
> > > > launch the BPM for that order.
> > > >
> > > > If you decided to use the Hold flag (i.e. put the order on
> hold, save
> > > > it, then take it off hold, save it), then you would:
> > > > Add a condition: the ttOrderHed.OrderHeld field has been
> changed from
> > > > True to False
> > > > Add a 4GL Action:
> > > > find first ttOrderHed no-lock no-error.
> > > > if available ttOrderHed then do:
> > > > for each OrderDtl where OrderDtl.Company = ttOrderHed.Company
> and
> > > > OrderDtl.OrderNum = ttOrderHed.OrderNum no-lock:
> > > > if OrderDtl.Date10 = ? then do:
> > > > Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,
> > > > 'Date10',ttOrderHed.Orderdate).
> > > > end.
> > > > end.
> > > > end.
> > > >
> > > > You have to use "Run lib..." instead of Assign as you're
> writing to a
> > > > "live" table and not a temp table.
> > > >
> > > > If you have a large range of orders that you need to run this
> for, it
> > > > is possible (though more complicated) to "cheat" and run a BPM
> once
> > > > for all of them. I've done this by setting up a UD table to
> accept a
> > > > first and last Order# and running 4GL code on every order
> between the
> > > > two.
> > > >
> > > >
> > > > Nigel.
> > > >
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
> wrote:
> > > > >
> > > > > That works, but there is still a problem.
> > > > >
> > > > > I would like an update to the OrderHed to update all the
> > > > > OrderDtl.Date10 records. As the code is, we would have to
> update
> > > > each
> > > > > line seperately, which we could do without any custom code.
> Sorry if
> > > > > this wasn't clear originally.
> > > > >
> > > > > Is this possible?
> > > > >
> > > > > Andrew
> > > >
> > >
> >
>
With a BPM in 8.03, is there an easy way to populate a user date field
with today's date on a GetNew? I was hoping to avoid writing 4GL code
for this, but maybe it is a good project to get my feet wet with 4GL.

Andrew
Hi Andrew,

I think 4GL is the only way to do this - other than a customisation
using VB.

The good news is that it's fairly easy to do. I'd create a post-
processing directive, add the 4GL action and use the following code:

find first ttOrderHed no-lock no-error.
if available ttOrderHed then do:
assign ttOrderHed.Date01 = TODAY.
end.

Change "ttOrderHed" for whatever table you're storing the date field
in.


HTH,

Nigel.



--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> With a BPM in 8.03, is there an easy way to populate a user date
field
> with today's date on a GetNew? I was hoping to avoid writing 4GL
code
> for this, but maybe it is a good project to get my feet wet with
4GL.
>
> Andrew
>
Thank you Nigel, your code worked perfect. Your mind reading skills
are also sharp - I needed to do the BPM to Order entry.

Hope I can return the favor someday.

Andrew

--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...>
wrote:
>
> Hi Andrew,
>
> I think 4GL is the only way to do this - other than a customisation
> using VB.
>
> The good news is that it's fairly easy to do. I'd create a post-
> processing directive, add the 4GL action and use the following code:
>
> find first ttOrderHed no-lock no-error.
> if available ttOrderHed then do:
> assign ttOrderHed.Date01 = TODAY.
> end.
>
> Change "ttOrderHed" for whatever table you're storing the date
field
> in.
>
>
> HTH,
>
> Nigel.
>
>
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > With a BPM in 8.03, is there an easy way to populate a user date
> field
> > with today's date on a GetNew? I was hoping to avoid writing 4GL
> code
> > for this, but maybe it is a good project to get my feet wet with
> 4GL.
> >
> > Andrew
> >
>
I am stumped again. The stuff shown below was so that I could add a
date to OrderDtl, but now I need to write some code to help update
existing order records and populate the OrderDtl.Date10 fields I added.

The following 4GL code almost works as a Post-Process BPM - it
populates the OrderDtl.Date10 field correctly but doesn't really save
it. That makes since since I am only updating the temp table, but when
I use the same code as a Pre-Process BPM it doesn't work.

---------
find first ttOrderHed no-lock no-error.
if available ttOrderHed then do:
for each ttOrderDtl where ttOrderDtl.OrderNum = ttOrderHed.OrderNum
no-lock.
if ttOrderDtl.Date10 = ? then do:
ttOrderDtl.Date10 = ttOrderHed.OrderDate.
end.
end.
end.
----------

Can someone tell me what I am doing wrong?

Andrew

--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> Thank you Nigel, your code worked perfect. Your mind reading skills
> are also sharp - I needed to do the BPM to Order entry.
>
> Hope I can return the favor someday.
>
> Andrew
>
> --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
> wrote:
> >
> > Hi Andrew,
> >
> > I think 4GL is the only way to do this - other than a customisation
> > using VB.
> >
> > The good news is that it's fairly easy to do. I'd create a post-
> > processing directive, add the 4GL action and use the following code:
> >
> > find first ttOrderHed no-lock no-error.
> > if available ttOrderHed then do:
> > assign ttOrderHed.Date01 = TODAY.
> > end.
> >
> > Change "ttOrderHed" for whatever table you're storing the date
> field
> > in.
> >
> >
> > HTH,
> >
> > Nigel.
> >
> >
> >
> > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > >
> > > With a BPM in 8.03, is there an easy way to populate a user date
> > field
> > > with today's date on a GetNew? I was hoping to avoid writing 4GL
> > code
> > > for this, but maybe it is a good project to get my feet wet with
> > 4GL.
> > >
> > > Andrew
> > >
> >
>
Hi Andrew,

Try this: a pre-processing directive against the SalesOrder.Update
BO, and make the code:

find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
ttOrderDtl.RowMod = 'A' no-lock.
if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
find OrderHed where ttOrderDtl.Company = OrderHed.Company and
ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
if available OrderHed then do:
ttOrderDtl.Date10 = OrderHed.OrderDate.
end.
end.

This code will check each line as it's being saved and update Date10
if needed.

Nigel.

--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> I am stumped again. The stuff shown below was so that I could add a
> date to OrderDtl, but now I need to write some code to help update
> existing order records and populate the OrderDtl.Date10 fields I
added.
>
> The following 4GL code almost works as a Post-Process BPM - it
> populates the OrderDtl.Date10 field correctly but doesn't really
save
> it. That makes since since I am only updating the temp table, but
when
> I use the same code as a Pre-Process BPM it doesn't work.
>
> ---------
> find first ttOrderHed no-lock no-error.
> if available ttOrderHed then do:
> for each ttOrderDtl where ttOrderDtl.OrderNum = ttOrderHed.OrderNum
> no-lock.
> if ttOrderDtl.Date10 = ? then do:
> ttOrderDtl.Date10 = ttOrderHed.OrderDate.
> end.
> end.
> end.
> ----------
>
> Can someone tell me what I am doing wrong?
>
> Andrew
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > Thank you Nigel, your code worked perfect. Your mind reading
skills
> > are also sharp - I needed to do the BPM to Order entry.
> >
> > Hope I can return the favor someday.
> >
> > Andrew
> >
> > --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
> > wrote:
> > >
> > > Hi Andrew,
> > >
> > > I think 4GL is the only way to do this - other than a
customisation
> > > using VB.
> > >
> > > The good news is that it's fairly easy to do. I'd create a post-
> > > processing directive, add the 4GL action and use the following
code:
> > >
> > > find first ttOrderHed no-lock no-error.
> > > if available ttOrderHed then do:
> > > assign ttOrderHed.Date01 = TODAY.
> > > end.
> > >
> > > Change "ttOrderHed" for whatever table you're storing the date
> > field
> > > in.
> > >
> > >
> > > HTH,
> > >
> > > Nigel.
> > >
> > >
> > >
> > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
wrote:
> > > >
> > > > With a BPM in 8.03, is there an easy way to populate a user
date
> > > field
> > > > with today's date on a GetNew? I was hoping to avoid writing
4GL
> > > code
> > > > for this, but maybe it is a good project to get my feet wet
with
> > > 4GL.
> > > >
> > > > Andrew
> > > >
> > >
> >
>
I tried what you said and I got and error saying to check the
AppServer log. The error in the Appserver log is the following:

FIND FIRST/LAST failed for table ttOrderDtl. (565)

Any suggestions?

Andrew

--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...> wrote:
>
> Hi Andrew,
>
> Try this: a pre-processing directive against the SalesOrder.Update
> BO, and make the code:
>
> find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> ttOrderDtl.RowMod = 'A' no-lock.
> if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> if available OrderHed then do:
> ttOrderDtl.Date10 = OrderHed.OrderDate.
> end.
> end.
>
> This code will check each line as it's being saved and update Date10
> if needed.
>
> Nigel.
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > I am stumped again. The stuff shown below was so that I could add a
> > date to OrderDtl, but now I need to write some code to help update
> > existing order records and populate the OrderDtl.Date10 fields I
> added.
> >
> > The following 4GL code almost works as a Post-Process BPM - it
> > populates the OrderDtl.Date10 field correctly but doesn't really
> save
> > it. That makes since since I am only updating the temp table, but
> when
> > I use the same code as a Pre-Process BPM it doesn't work.
> >
> > ---------
> > find first ttOrderHed no-lock no-error.
> > if available ttOrderHed then do:
> > for each ttOrderDtl where ttOrderDtl.OrderNum = ttOrderHed.OrderNum
> > no-lock.
> > if ttOrderDtl.Date10 = ? then do:
> > ttOrderDtl.Date10 = ttOrderHed.OrderDate.
> > end.
> > end.
> > end.
> > ----------
> >
> > Can someone tell me what I am doing wrong?
> >
> > Andrew
> >
> > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > >
> > > Thank you Nigel, your code worked perfect. Your mind reading
> skills
> > > are also sharp - I needed to do the BPM to Order entry.
> > >
> > > Hope I can return the favor someday.
> > >
> > > Andrew
> > >
> > > --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
> > > wrote:
> > > >
> > > > Hi Andrew,
> > > >
> > > > I think 4GL is the only way to do this - other than a
> customisation
> > > > using VB.
> > > >
> > > > The good news is that it's fairly easy to do. I'd create a post-
> > > > processing directive, add the 4GL action and use the following
> code:
> > > >
> > > > find first ttOrderHed no-lock no-error.
> > > > if available ttOrderHed then do:
> > > > assign ttOrderHed.Date01 = TODAY.
> > > > end.
> > > >
> > > > Change "ttOrderHed" for whatever table you're storing the date
> > > field
> > > > in.
> > > >
> > > >
> > > > HTH,
> > > >
> > > > Nigel.
> > > >
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
> wrote:
> > > > >
> > > > > With a BPM in 8.03, is there an easy way to populate a user
> date
> > > > field
> > > > > with today's date on a GetNew? I was hoping to avoid writing
> 4GL
> > > > code
> > > > > for this, but maybe it is a good project to get my feet wet
> with
> > > > 4GL.
> > > > >
> > > > > Andrew
> > > > >
> > > >
> > >
> >
>
I'm hoping that the error poped up for a line that you DID enter
Date10 for. Sorry, the first line should have a "no-error" after the
"no-lock", (but before the ".")

The error is saying that it couldn't find a line marked as "Added" or
"Updated". The "no-error" suppresses this.

Nigel.


--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> I tried what you said and I got and error saying to check the
> AppServer log. The error in the Appserver log is the following:
>
> FIND FIRST/LAST failed for table ttOrderDtl. (565)
>
> Any suggestions?
>
> Andrew
>
> --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
wrote:
> >
> > Hi Andrew,
> >
> > Try this: a pre-processing directive against the
SalesOrder.Update
> > BO, and make the code:
> >
> > find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> > ttOrderDtl.RowMod = 'A' no-lock.
> > if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> > find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> > ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> > if available OrderHed then do:
> > ttOrderDtl.Date10 = OrderHed.OrderDate.
> > end.
> > end.
> >
> > This code will check each line as it's being saved and update
Date10
> > if needed.
> >
> > Nigel.
> >
> > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > >
> > > I am stumped again. The stuff shown below was so that I could
add a
> > > date to OrderDtl, but now I need to write some code to help
update
> > > existing order records and populate the OrderDtl.Date10 fields
I
> > added.
> > >
> > > The following 4GL code almost works as a Post-Process BPM - it
> > > populates the OrderDtl.Date10 field correctly but doesn't
really
> > save
> > > it. That makes since since I am only updating the temp table,
but
> > when
> > > I use the same code as a Pre-Process BPM it doesn't work.
> > >
> > > ---------
> > > find first ttOrderHed no-lock no-error.
> > > if available ttOrderHed then do:
> > > for each ttOrderDtl where ttOrderDtl.OrderNum =
ttOrderHed.OrderNum
> > > no-lock.
> > > if ttOrderDtl.Date10 = ? then do:
> > > ttOrderDtl.Date10 = ttOrderHed.OrderDate.
> > > end.
> > > end.
> > > end.
> > > ----------
> > >
> > > Can someone tell me what I am doing wrong?
> > >
> > > Andrew
> > >
> > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
wrote:
> > > >
> > > > Thank you Nigel, your code worked perfect. Your mind reading
> > skills
> > > > are also sharp - I needed to do the BPM to Order entry.
> > > >
> > > > Hope I can return the favor someday.
> > > >
> > > > Andrew
> > > >
> > > > --- In vantage@yahoogroups.com, "Nigel Kerley"
<nigel.kerley@>
> > > > wrote:
> > > > >
> > > > > Hi Andrew,
> > > > >
> > > > > I think 4GL is the only way to do this - other than a
> > customisation
> > > > > using VB.
> > > > >
> > > > > The good news is that it's fairly easy to do. I'd create a
post-
> > > > > processing directive, add the 4GL action and use the
following
> > code:
> > > > >
> > > > > find first ttOrderHed no-lock no-error.
> > > > > if available ttOrderHed then do:
> > > > > assign ttOrderHed.Date01 = TODAY.
> > > > > end.
> > > > >
> > > > > Change "ttOrderHed" for whatever table you're storing the
date
> > > > field
> > > > > in.
> > > > >
> > > > >
> > > > > HTH,
> > > > >
> > > > > Nigel.
> > > > >
> > > > >
> > > > >
> > > > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
> > wrote:
> > > > > >
> > > > > > With a BPM in 8.03, is there an easy way to populate a
user
> > date
> > > > > field
> > > > > > with today's date on a GetNew? I was hoping to avoid
writing
> > 4GL
> > > > > code
> > > > > > for this, but maybe it is a good project to get my feet
wet
> > with
> > > > > 4GL.
> > > > > >
> > > > > > Andrew
> > > > > >
> > > > >
> > > >
> > >
> >
>
That works, but there is still a problem.

I would like an update to the OrderHed to update all the
OrderDtl.Date10 records. As the code is, we would have to update each
line seperately, which we could do without any custom code. Sorry if
this wasn't clear originally.

Is this possible?

Andrew
--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...> wrote:
>
> I'm hoping that the error poped up for a line that you DID enter
> Date10 for. Sorry, the first line should have a "no-error" after the
> "no-lock", (but before the ".")
>
> The error is saying that it couldn't find a line marked as "Added" or
> "Updated". The "no-error" suppresses this.
>
> Nigel.
>
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > I tried what you said and I got and error saying to check the
> > AppServer log. The error in the Appserver log is the following:
> >
> > FIND FIRST/LAST failed for table ttOrderDtl. (565)
> >
> > Any suggestions?
> >
> > Andrew
> >
> > --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
> wrote:
> > >
> > > Hi Andrew,
> > >
> > > Try this: a pre-processing directive against the
> SalesOrder.Update
> > > BO, and make the code:
> > >
> > > find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> > > ttOrderDtl.RowMod = 'A' no-lock.
> > > if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> > > find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> > > ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> > > if available OrderHed then do:
> > > ttOrderDtl.Date10 = OrderHed.OrderDate.
> > > end.
> > > end.
> > >
> > > This code will check each line as it's being saved and update
> Date10
> > > if needed.
> > >
> > > Nigel.
> > >
> > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > > >
> > > > I am stumped again. The stuff shown below was so that I could
> add a
> > > > date to OrderDtl, but now I need to write some code to help
> update
> > > > existing order records and populate the OrderDtl.Date10 fields
> I
> > > added.
> > > >
> > > > The following 4GL code almost works as a Post-Process BPM - it
> > > > populates the OrderDtl.Date10 field correctly but doesn't
> really
> > > save
> > > > it. That makes since since I am only updating the temp table,
> but
> > > when
> > > > I use the same code as a Pre-Process BPM it doesn't work.
> > > >
> > > > ---------
> > > > find first ttOrderHed no-lock no-error.
> > > > if available ttOrderHed then do:
> > > > for each ttOrderDtl where ttOrderDtl.OrderNum =
> ttOrderHed.OrderNum
> > > > no-lock.
> > > > if ttOrderDtl.Date10 = ? then do:
> > > > ttOrderDtl.Date10 = ttOrderHed.OrderDate.
> > > > end.
> > > > end.
> > > > end.
> > > > ----------
> > > >
> > > > Can someone tell me what I am doing wrong?
> > > >
> > > > Andrew
> > > >
> > > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
> wrote:
> > > > >
> > > > > Thank you Nigel, your code worked perfect. Your mind reading
> > > skills
> > > > > are also sharp - I needed to do the BPM to Order entry.
> > > > >
> > > > > Hope I can return the favor someday.
> > > > >
> > > > > Andrew
> > > > >
> > > > > --- In vantage@yahoogroups.com, "Nigel Kerley"
> <nigel.kerley@>
> > > > > wrote:
> > > > > >
> > > > > > Hi Andrew,
> > > > > >
> > > > > > I think 4GL is the only way to do this - other than a
> > > customisation
> > > > > > using VB.
> > > > > >
> > > > > > The good news is that it's fairly easy to do. I'd create a
> post-
> > > > > > processing directive, add the 4GL action and use the
> following
> > > code:
> > > > > >
> > > > > > find first ttOrderHed no-lock no-error.
> > > > > > if available ttOrderHed then do:
> > > > > > assign ttOrderHed.Date01 = TODAY.
> > > > > > end.
> > > > > >
> > > > > > Change "ttOrderHed" for whatever table you're storing the
> date
> > > > > field
> > > > > > in.
> > > > > >
> > > > > >
> > > > > > HTH,
> > > > > >
> > > > > > Nigel.
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
> > > wrote:
> > > > > > >
> > > > > > > With a BPM in 8.03, is there an easy way to populate a
> user
> > > date
> > > > > > field
> > > > > > > with today's date on a GetNew? I was hoping to avoid
> writing
> > > 4GL
> > > > > > code
> > > > > > > for this, but maybe it is a good project to get my feet
> wet
> > > with
> > > > > > 4GL.
> > > > > > >
> > > > > > > Andrew
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
I've just re-read your earlier posts and seen your mention of
"existing orders". Sorry, hadn't noticed it before.

Yes, it's possible but there is a complication. You need something to
"kick-off" the BPM, something that has the OrderNum. Problem is that
all your orders are already entered. So you would have to open each
order, tick a box/make a change and save the order. This would then
launch the BPM for that order.

If you decided to use the Hold flag (i.e. put the order on hold, save
it, then take it off hold, save it), then you would:
Add a condition: the ttOrderHed.OrderHeld field has been changed from
True to False
Add a 4GL Action:
find first ttOrderHed no-lock no-error.
if available ttOrderHed then do:
for each OrderDtl where OrderDtl.Company = ttOrderHed.Company and
OrderDtl.OrderNum = ttOrderHed.OrderNum no-lock:
if OrderDtl.Date10 = ? then do:
Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,
'Date10',ttOrderHed.Orderdate).
end.
end.
end.

You have to use "Run lib..." instead of Assign as you're writing to a
"live" table and not a temp table.

If you have a large range of orders that you need to run this for, it
is possible (though more complicated) to "cheat" and run a BPM once
for all of them. I've done this by setting up a UD table to accept a
first and last Order# and running 4GL code on every order between the
two.


Nigel.



--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> That works, but there is still a problem.
>
> I would like an update to the OrderHed to update all the
> OrderDtl.Date10 records. As the code is, we would have to update
each
> line seperately, which we could do without any custom code. Sorry if
> this wasn't clear originally.
>
> Is this possible?
>
> Andrew
I will try that. Thank you for the (always) great help.

Just one more question for my own education. Does the Update bo only
make temp tables for tables that have been changed? So since I was
only making a change to the OrderHed table, then there was no
ttOrderDtl tables generated. This would be one of those key nuggets of
knowledge about how BPMs and BOs that would be really helpful to
understand for the future.

Thanks again.

Andrew

--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...> wrote:
>
> I've just re-read your earlier posts and seen your mention of
> "existing orders". Sorry, hadn't noticed it before.
>
> Yes, it's possible but there is a complication. You need something to
> "kick-off" the BPM, something that has the OrderNum. Problem is that
> all your orders are already entered. So you would have to open each
> order, tick a box/make a change and save the order. This would then
> launch the BPM for that order.
>
> If you decided to use the Hold flag (i.e. put the order on hold, save
> it, then take it off hold, save it), then you would:
> Add a condition: the ttOrderHed.OrderHeld field has been changed from
> True to False
> Add a 4GL Action:
> find first ttOrderHed no-lock no-error.
> if available ttOrderHed then do:
> for each OrderDtl where OrderDtl.Company = ttOrderHed.Company and
> OrderDtl.OrderNum = ttOrderHed.OrderNum no-lock:
> if OrderDtl.Date10 = ? then do:
> Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,
> 'Date10',ttOrderHed.Orderdate).
> end.
> end.
> end.
>
> You have to use "Run lib..." instead of Assign as you're writing to a
> "live" table and not a temp table.
>
> If you have a large range of orders that you need to run this for, it
> is possible (though more complicated) to "cheat" and run a BPM once
> for all of them. I've done this by setting up a UD table to accept a
> first and last Order# and running 4GL code on every order between the
> two.
>
>
> Nigel.
>
>
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > That works, but there is still a problem.
> >
> > I would like an update to the OrderHed to update all the
> > OrderDtl.Date10 records. As the code is, we would have to update
> each
> > line seperately, which we could do without any custom code. Sorry if
> > this wasn't clear originally.
> >
> > Is this possible?
> >
> > Andrew
>
Problems again. I wish I understood this better so I could help
myself, but until then....

When I tried the new code I got two Application Error messages. The
first is..

Error Detail
============
7175


Stack Trace
===========
at Progress.Open4GL.DynamicAPI.Session.runProcedure(String
requestID, String procedureName, ParameterSet parms, Boolean
persistent, Boolean internal_Renamed, Int64 procId, MetaSchema
localSchema, Int32 stateModel)
at Progress.Open4GL.DynamicAPI.Session.runStatelessProcedure(String
requestID, String fullProcedureName, ParameterSet inparams, Object
procId, MetaSchema localSchema, Int32 stateModel)
at
Progress.Open4GL.DynamicAPI.PersistentProc.runTheProcedure(String
requestID, String procedureName, ParameterSet parms, MetaSchema schema)
at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String
procedureName, ParameterSet parms, MetaSchema schema)
at Epicor.Mfg.Proxy.SalesOrderImpl.Update(SalesOrderDataSet ds)
at Epicor.Mfg.UI.Adapters.SalesOrderAdapter.Update()
at Epicor.Mfg.UI.App.SalesOrderEntry.Transaction.Update()

The second one is..

Error Detail
============
Tried to call a method in an invalid procedure. (7224)


Stack Trace
===========
at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String
procedureName, ParameterSet parms, MetaSchema schema)
at Epicor.Mfg.Proxy.ReportMonitorImpl.GetRowsKeepIdleTime(String
whereClauseSysRptLst, Int32 pageSize, Int32 absolutePage, Boolean&
morePages)
at
Epicor.Mfg.UI.Adapters.ReportMonitorAdapter.GetRowsKeepIdleTime(SearchOptions
opts, Boolean& MorePages)

They pretty much kill the Vantage session.

Any Ideas?

Andrew

--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> I will try that. Thank you for the (always) great help.
>
> Just one more question for my own education. Does the Update bo only
> make temp tables for tables that have been changed? So since I was
> only making a change to the OrderHed table, then there was no
> ttOrderDtl tables generated. This would be one of those key nuggets of
> knowledge about how BPMs and BOs that would be really helpful to
> understand for the future.
>
> Thanks again.
>
> Andrew
>
> --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@> wrote:
> >
> > I've just re-read your earlier posts and seen your mention of
> > "existing orders". Sorry, hadn't noticed it before.
> >
> > Yes, it's possible but there is a complication. You need something to
> > "kick-off" the BPM, something that has the OrderNum. Problem is that
> > all your orders are already entered. So you would have to open each
> > order, tick a box/make a change and save the order. This would then
> > launch the BPM for that order.
> >
> > If you decided to use the Hold flag (i.e. put the order on hold, save
> > it, then take it off hold, save it), then you would:
> > Add a condition: the ttOrderHed.OrderHeld field has been changed from
> > True to False
> > Add a 4GL Action:
> > find first ttOrderHed no-lock no-error.
> > if available ttOrderHed then do:
> > for each OrderDtl where OrderDtl.Company = ttOrderHed.Company and
> > OrderDtl.OrderNum = ttOrderHed.OrderNum no-lock:
> > if OrderDtl.Date10 = ? then do:
> > Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,
> > 'Date10',ttOrderHed.Orderdate).
> > end.
> > end.
> > end.
> >
> > You have to use "Run lib..." instead of Assign as you're writing to a
> > "live" table and not a temp table.
> >
> > If you have a large range of orders that you need to run this for, it
> > is possible (though more complicated) to "cheat" and run a BPM once
> > for all of them. I've done this by setting up a UD table to accept a
> > first and last Order# and running 4GL code on every order between the
> > two.
> >
> >
> > Nigel.
> >
> >
> >
> > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > >
> > > That works, but there is still a problem.
> > >
> > > I would like an update to the OrderHed to update all the
> > > OrderDtl.Date10 records. As the code is, we would have to update
> > each
> > > line seperately, which we could do without any custom code. Sorry if
> > > this wasn't clear originally.
> > >
> > > Is this possible?
> > >
> > > Andrew
> >
>
My understanding is that, yes, Vantage only works with one temp table
at a time. When a user creates (say) a new sales order the temp table
is ttOrderHed (and the OrderNum = 0). The user then creates a new
line and the ttOrderHed is saved (and the OrderNum generated) and
Vantage switches to ttOrderDtl. When that line is saved, ttOrderDtl
is saved to OrderDtl and a new blank ttOrderDtl is creates.

So it's not just one temp table, it's also just one temp record in
that table.

Unless someone else know differently....


Nigel.



--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> I will try that. Thank you for the (always) great help.
>
> Just one more question for my own education. Does the Update bo only
> make temp tables for tables that have been changed? So since I was
> only making a change to the OrderHed table, then there was no
> ttOrderDtl tables generated. This would be one of those key nuggets
of
> knowledge about how BPMs and BOs that would be really helpful to
> understand for the future.
>
> Thanks again.
>
> Andrew
>
> --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
wrote:
> >
> > I've just re-read your earlier posts and seen your mention of
> > "existing orders". Sorry, hadn't noticed it before.
> >
> > Yes, it's possible but there is a complication. You need
something to
> > "kick-off" the BPM, something that has the OrderNum. Problem is
that
> > all your orders are already entered. So you would have to open
each
> > order, tick a box/make a change and save the order. This would
then
> > launch the BPM for that order.
> >
> > If you decided to use the Hold flag (i.e. put the order on hold,
save
> > it, then take it off hold, save it), then you would:
> > Add a condition: the ttOrderHed.OrderHeld field has been changed
from
> > True to False
> > Add a 4GL Action:
> > find first ttOrderHed no-lock no-error.
> > if available ttOrderHed then do:
> > for each OrderDtl where OrderDtl.Company = ttOrderHed.Company
and
> > OrderDtl.OrderNum = ttOrderHed.OrderNum no-lock:
> > if OrderDtl.Date10 = ? then do:
> > Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,
> > 'Date10',ttOrderHed.Orderdate).
> > end.
> > end.
> > end.
> >
> > You have to use "Run lib..." instead of Assign as you're writing
to a
> > "live" table and not a temp table.
> >
> > If you have a large range of orders that you need to run this
for, it
> > is possible (though more complicated) to "cheat" and run a BPM
once
> > for all of them. I've done this by setting up a UD table to
accept a
> > first and last Order# and running 4GL code on every order between
the
> > two.
> >
> >
> > Nigel.
> >
> >
> >
> > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> > >
> > > That works, but there is still a problem.
> > >
> > > I would like an update to the OrderHed to update all the
> > > OrderDtl.Date10 records. As the code is, we would have to
update
> > each
> > > line seperately, which we could do without any custom code.
Sorry if
> > > this wasn't clear originally.
> > >
> > > Is this possible?
> > >
> > > Andrew
> >
>
Is there any message in the mfgtest803.server.log (or
mfgsys803.server.log if you're on the live db)? It's in
\\server\epicor\mfgsys803\server\logs.

Did you copy/paste my code? I've just tried it again and it works for
me. Try commenting out the "Run lib\..." statement to see if that's
the cause - put a /* before the line and */ at the end of the line -
the line should turn green. Save it and trigger it and see what
happens.

Nigel.




--- In vantage@yahoogroups.com, "andrew.tapper" <atapper@...> wrote:
>
> Problems again. I wish I understood this better so I could help
> myself, but until then....
>
> When I tried the new code I got two Application Error messages. The
> first is..
>
> Error Detail
> ============
> 7175
>
>
> Stack Trace
> ===========
> at Progress.Open4GL.DynamicAPI.Session.runProcedure(String
> requestID, String procedureName, ParameterSet parms, Boolean
> persistent, Boolean internal_Renamed, Int64 procId, MetaSchema
> localSchema, Int32 stateModel)
> at Progress.Open4GL.DynamicAPI.Session.runStatelessProcedure
(String
> requestID, String fullProcedureName, ParameterSet inparams, Object
> procId, MetaSchema localSchema, Int32 stateModel)
> at
> Progress.Open4GL.DynamicAPI.PersistentProc.runTheProcedure(String
> requestID, String procedureName, ParameterSet parms, MetaSchema
schema)
> at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String
> procedureName, ParameterSet parms, MetaSchema schema)
> at Epicor.Mfg.Proxy.SalesOrderImpl.Update(SalesOrderDataSet ds)
> at Epicor.Mfg.UI.Adapters.SalesOrderAdapter.Update()
> at Epicor.Mfg.UI.App.SalesOrderEntry.Transaction.Update()
>
> The second one is..
>
> Error Detail
> ============
> Tried to call a method in an invalid procedure. (7224)
>
>
> Stack Trace
> ===========
> at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String
> procedureName, ParameterSet parms, MetaSchema schema)
> at Epicor.Mfg.Proxy.ReportMonitorImpl.GetRowsKeepIdleTime(String
> whereClauseSysRptLst, Int32 pageSize, Int32 absolutePage, Boolean&
> morePages)
> at
> Epicor.Mfg.UI.Adapters.ReportMonitorAdapter.GetRowsKeepIdleTime
(SearchOptions
> opts, Boolean& MorePages)
>
> They pretty much kill the Vantage session.
>
> Any Ideas?
>
> Andrew
>
> --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@> wrote:
> >
> > I will try that. Thank you for the (always) great help.
> >
> > Just one more question for my own education. Does the Update bo
only
> > make temp tables for tables that have been changed? So since I was
> > only making a change to the OrderHed table, then there was no
> > ttOrderDtl tables generated. This would be one of those key
nuggets of
> > knowledge about how BPMs and BOs that would be really helpful to
> > understand for the future.
> >
> > Thanks again.
> >
> > Andrew
> >
> > --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
wrote:
> > >
> > > I've just re-read your earlier posts and seen your mention of
> > > "existing orders". Sorry, hadn't noticed it before.
> > >
> > > Yes, it's possible but there is a complication. You need
something to
> > > "kick-off" the BPM, something that has the OrderNum. Problem is
that
> > > all your orders are already entered. So you would have to open
each
> > > order, tick a box/make a change and save the order. This would
then
> > > launch the BPM for that order.
> > >
> > > If you decided to use the Hold flag (i.e. put the order on
hold, save
> > > it, then take it off hold, save it), then you would:
> > > Add a condition: the ttOrderHed.OrderHeld field has been
changed from
> > > True to False
> > > Add a 4GL Action:
> > > find first ttOrderHed no-lock no-error.
> > > if available ttOrderHed then do:
> > > for each OrderDtl where OrderDtl.Company = ttOrderHed.Company
and
> > > OrderDtl.OrderNum = ttOrderHed.OrderNum no-lock:
> > > if OrderDtl.Date10 = ? then do:
> > > Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,
> > > 'Date10',ttOrderHed.Orderdate).
> > > end.
> > > end.
> > > end.
> > >
> > > You have to use "Run lib..." instead of Assign as you're
writing to a
> > > "live" table and not a temp table.
> > >
> > > If you have a large range of orders that you need to run this
for, it
> > > is possible (though more complicated) to "cheat" and run a BPM
once
> > > for all of them. I've done this by setting up a UD table to
accept a
> > > first and last Order# and running 4GL code on every order
between the
> > > two.
> > >
> > >
> > > Nigel.
> > >
> > >
> > >
> > > --- In vantage@yahoogroups.com, "andrew.tapper" <atapper@>
wrote:
> > > >
> > > > That works, but there is still a problem.
> > > >
> > > > I would like an update to the OrderHed to update all the
> > > > OrderDtl.Date10 records. As the code is, we would have to
update
> > > each
> > > > line seperately, which we could do without any custom code.
Sorry if
> > > > this wasn't clear originally.
> > > >
> > > > Is this possible?
> > > >
> > > > Andrew
> > >
> >
>
Nigel,

I'm trying to use some of your suggestions for Andrew, to do the
following:
Create a new Sales Order
Fill in Customer
Check a custom field called Checkbox01
When the Sales Order is saved, the InvoiceComment field would fill
with the InvoiceComment information from another saved Sales Order.

Using the following code as a CreateNew Post Directive will fill the
"InvoiceComment" on the new Order every time, if I create a new Order
and apply no conditional statement.
----------------------
find first ttOrderHed no-lock no-error.
if available ttOrderHed then do:

Find first OrderHed where OrderHed.OrderNum = 10720 No-lock no-error.
if avail OrderHed Then do:
assign ttOrderHed.InvoiceComment = OrderHed.InvoiceComment.
end.
end.
----------------------
I have tried every combination I can think of to get this to work when
a checkbox is checked (conditional statement) and nothing works. Have
tried it in both Update and GetNew.

I've also tried using
Run lib\UpdateTableBuffer.p(input BUFFER
ttOrderHed:HANDLE,'InvoiceComment',OrderHed.InvoiceComment).

Also doesn't work

Any suggestions?
Would appreciate any assistance

Thanks
Dave
8.03.406A Progress
Xybix

--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...> wrote:
>
> Hi Andrew,
>
> Try this: a pre-processing directive against the SalesOrder.Update
> BO, and make the code:
>
> find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> ttOrderDtl.RowMod = 'A' no-lock.
> if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> if available OrderHed then do:
> ttOrderDtl.Date10 = OrderHed.OrderDate.
> end.
> end.
>
> This code will check each line as it's being saved and update Date10
> if needed.
>
> Nigel.
>
Hi Dave,

Try creating it as a post-processing directive against the Update BO.

Use the condition: "number of rows in the (below) query is not less
than 1".

The query would be "for each ttOrderHed where ttOrderHed.CheckBox01 =
true"


Nigel.


--- In vantage@yahoogroups.com, "ofcwiz" <DavidH@...> wrote:
>
> Nigel,
>
> I'm trying to use some of your suggestions for Andrew, to do the
> following:
> Create a new Sales Order
> Fill in Customer
> Check a custom field called Checkbox01
> When the Sales Order is saved, the InvoiceComment field would
fill
> with the InvoiceComment information from another saved Sales Order.
>
> Using the following code as a CreateNew Post Directive will fill the
> "InvoiceComment" on the new Order every time, if I create a new
Order
> and apply no conditional statement.
> ----------------------
> find first ttOrderHed no-lock no-error.
> if available ttOrderHed then do:
>
> Find first OrderHed where OrderHed.OrderNum = 10720 No-lock no-
error.
> if avail OrderHed Then do:
> assign ttOrderHed.InvoiceComment = OrderHed.InvoiceComment.
> end.
> end.
> ----------------------
> I have tried every combination I can think of to get this to work
when
> a checkbox is checked (conditional statement) and nothing works.
Have
> tried it in both Update and GetNew.
>
> I've also tried using
> Run lib\UpdateTableBuffer.p(input BUFFER
> ttOrderHed:HANDLE,'InvoiceComment',OrderHed.InvoiceComment).
>
> Also doesn't work
>
> Any suggestions?
> Would appreciate any assistance
>
> Thanks
> Dave
> 8.03.406A Progress
> Xybix
>
> --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
wrote:
> >
> > Hi Andrew,
> >
> > Try this: a pre-processing directive against the
SalesOrder.Update
> > BO, and make the code:
> >
> > find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> > ttOrderDtl.RowMod = 'A' no-lock.
> > if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> > find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> > ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> > if available OrderHed then do:
> > ttOrderDtl.Date10 = OrderHed.OrderDate.
> > end.
> > end.
> >
> > This code will check each line as it's being saved and update
Date10
> > if needed.
> >
> > Nigel.
> >
>
Thanks Nigel,

It looks like it's working.
I really appreciate your support on this site.

Merry Christmas to all the site members.
This task would be a lot more difficult without this site and its
members, so willing to share information.

Thank you,
Dave
8.03.406A Progress
Xybix

--- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@...> wrote:
>
> Hi Dave,
>
> Try creating it as a post-processing directive against the Update BO.
>
> Use the condition: "number of rows in the (below) query is not less
> than 1".
>
> The query would be "for each ttOrderHed where ttOrderHed.CheckBox01 =
> true"
>
>
> Nigel.
>
>
> --- In vantage@yahoogroups.com, "ofcwiz" <DavidH@> wrote:
> >
> > Nigel,
> >
> > I'm trying to use some of your suggestions for Andrew, to do the
> > following:
> > Create a new Sales Order
> > Fill in Customer
> > Check a custom field called Checkbox01
> > When the Sales Order is saved, the InvoiceComment field would
> fill
> > with the InvoiceComment information from another saved Sales Order.
> >
> > Using the following code as a CreateNew Post Directive will fill the
> > "InvoiceComment" on the new Order every time, if I create a new
> Order
> > and apply no conditional statement.
> > ----------------------
> > find first ttOrderHed no-lock no-error.
> > if available ttOrderHed then do:
> >
> > Find first OrderHed where OrderHed.OrderNum = 10720 No-lock no-
> error.
> > if avail OrderHed Then do:
> > assign ttOrderHed.InvoiceComment = OrderHed.InvoiceComment.
> > end.
> > end.
> > ----------------------
> > I have tried every combination I can think of to get this to work
> when
> > a checkbox is checked (conditional statement) and nothing works.
> Have
> > tried it in both Update and GetNew.
> >
> > I've also tried using
> > Run lib\UpdateTableBuffer.p(input BUFFER
> > ttOrderHed:HANDLE,'InvoiceComment',OrderHed.InvoiceComment).
> >
> > Also doesn't work
> >
> > Any suggestions?
> > Would appreciate any assistance
> >
> > Thanks
> > Dave
> > 8.03.406A Progress
> > Xybix
> >
> > --- In vantage@yahoogroups.com, "Nigel Kerley" <nigel.kerley@>
> wrote:
> > >
> > > Hi Andrew,
> > >
> > > Try this: a pre-processing directive against the
> SalesOrder.Update
> > > BO, and make the code:
> > >
> > > find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> > > ttOrderDtl.RowMod = 'A' no-lock.
> > > if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> > > find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> > > ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> > > if available OrderHed then do:
> > > ttOrderDtl.Date10 = OrderHed.OrderDate.
> > > end.
> > > end.
> > >
> > > This code will check each line as it's being saved and update
> Date10
> > > if needed.
> > >
> > > Nigel.
> > >
> >
>
Dave:

 I second that , and Merry Christmas to all.

Bill J.




________________________________
From: ofcwiz <DavidH@...>
To: vantage@yahoogroups.com
Sent: Tuesday, December 23, 2008 5:00:09 PM
Subject: [Vantage] Re: Date field update w/BPM


Thanks Nigel,

It looks like it's working.
I really appreciate your support on this site.

Merry Christmas to all the site members.
This task would be a lot more difficult without this site and its
members, so willing to share information.

Thank you,
Dave
8.03.406A Progress
Xybix

--- In vantage@yahoogroups .com, "Nigel Kerley" <nigel.kerley@ ...> wrote:
>
> Hi Dave,
>
> Try creating it as a post-processing directive against the Update BO.
>
> Use the condition: "number of rows in the (below) query is not less
> than 1".
>
> The query would be "for each ttOrderHed where ttOrderHed.CheckBox 01 =
> true"
>
>
> Nigel.
>
>
> --- In vantage@yahoogroups .com, "ofcwiz" <DavidH@> wrote:
> >
> > Nigel,
> >
> > I'm trying to use some of your suggestions for Andrew, to do the
> > following:
> > Create a new Sales Order
> > Fill in Customer
> > Check a custom field called Checkbox01
> > When the Sales Order is saved, the InvoiceComment field would
> fill
> > with the InvoiceComment information from another saved Sales Order.
> >
> > Using the following code as a CreateNew Post Directive will fill the
> > "InvoiceComment" on the new Order every time, if I create a new
> Order
> > and apply no conditional statement.
> > ------------ --------- -
> > find first ttOrderHed no-lock no-error.
> > if available ttOrderHed then do:
> >
> > Find first OrderHed where OrderHed.OrderNum = 10720 No-lock no-
> error.
> > if avail OrderHed Then do:
> > assign ttOrderHed.InvoiceC omment = OrderHed.InvoiceCom ment.
> > end.
> > end.
> > ------------ --------- -
> > I have tried every combination I can think of to get this to work
> when
> > a checkbox is checked (conditional statement) and nothing works.
> Have
> > tried it in both Update and GetNew.
> >
> > I've also tried using
> > Run lib\UpdateTableBuff er.p(input BUFFER
> > ttOrderHed:HANDLE, 'InvoiceComment' ,OrderHed. InvoiceComment) .
> >
> > Also doesn't work
> >
> > Any suggestions?
> > Would appreciate any assistance
> >
> > Thanks
> > Dave
> > 8.03.406A Progress
> > Xybix
> >
> > --- In vantage@yahoogroups .com, "Nigel Kerley" <nigel.kerley@ >
> wrote:
> > >
> > > Hi Andrew,
> > >
> > > Try this: a pre-processing directive against the
> SalesOrder.Update
> > > BO, and make the code:
> > >
> > > find first ttOrderDtl where ttOrderDtl.RowMod = 'U' or
> > > ttOrderDtl.RowMod = 'A' no-lock.
> > > if available ttOrderDtl and ttOrderDtl.Date10 = ? then do:
> > > find OrderHed where ttOrderDtl.Company = OrderHed.Company and
> > > ttOrderDtl.OrderNum = OrderHed.OrderNum no-lock.
> > > if available OrderHed then do:
> > > ttOrderDtl.Date10 = OrderHed.OrderDate.
> > > end.
> > > end.
> > >
> > > This code will check each line as it's being saved and update
> Date10
> > > if needed.
> > >
> > > Nigel.
> > >
> >
>






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