Call for a simple? example

Bruce,

If it is only for a FKV then you can just create a subtable FKV from order
entry. Then you will not any customizations.

You create a main FKV for the Part table and then create another sub FKV and
select a PartPlant table. From there the sub table fields will be available
in the new FKV.

Ross

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
cooner_55421
Sent: Friday, June 25, 2010 3:34 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Call for a simple? example

Hi Ross,

Thanks, I'll give this a try.
I am using Number20 in the Part table but it doesn't have to update during
entry.
I just want the value for a foreign key view on the sale order entry, line
screen.
We're trying to get service to push the need-by date out if there is nothing
on hand.
They might start doing it if we make the lead-time visible....

Still here for the summer...
Bruce

--- In vantage@yahoogroups.com, "Ross Hughes" <ross.hughes@...> wrote:
>
> Hi Bruce,
>
> I would do this as a client customization because you want the part field
to
> change right after the lead time field changes. BPM's trigger on
> object/methods and not field changes. A multi-plant scenario may give
> unpredictable results.
>
> I wrote something that should work for you. Create a part customization
and
> paste the following code right before the final End Module line.
>
> Private Sub PartPlant_AfterFieldChange(ByVal sender As object, ByVal
> args As DataColumnChangeEventArgs) Handles PartPlant_Column.ColumnChanged
> '// ** Argument Properties and Uses **
> '// args.Row("[FieldName]")
> '// args.Column, args.ProposedValue, args.Row
> '
> 'Add Event Handler Code
> '
> Select Case args.Column.ColumnName
>
> Case "LeadTime"
> Dim edvPartPlant As EpiDataView =
> CType(oTrans.EpiDataViews("PartPlant"), EpiDataView)
> Dim intLeadTime As Int32 =
> edvPartPlant.dataView(edvPartPlant.Row)("LeadTime")
> Dim edvPart As EpiDataView =
> CType(oTrans.EpiDataViews("Part"), EpiDataView)
> edvPart.dataView(edvPart.Row)("Number20") = intLeadTime
> edvPart.Notify( New EpiNotifyArgs(oTrans, edvPart.Row,
> edvPart.Column) )
> Case Else
>
> End Select
>
> End Sub
>
> Be careful for line wraps.
>
> I am assuming here you are using Number20 in the Part table. If you are
> using a different field and having trouble, I can tailor it if needed.
>
> Hope this helps,
> Ross
>
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of
> cooner_55421
> Sent: Wednesday, June 23, 2010 2:39 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Call for a simple? example
>
> Hi,
>
> Help... I am looking for an example.
>
> When I update the lead-time in the Part Plant screen, I would like the
> system to copy that value and use it to update a user defined field in the
> Part table.
>
> Would you use a BPM, screen customization, something else?
>
>
> Thanks in advance.
>
> Bruce
>
>
>
> ------------------------------------
>
> 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
>




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

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
Hi Bruce,

I would do this as a client customization because you want the part field to
change right after the lead time field changes. BPM's trigger on
object/methods and not field changes. A multi-plant scenario may give
unpredictable results.

I wrote something that should work for you. Create a part customization and
paste the following code right before the final End Module line.

Private Sub PartPlant_AfterFieldChange(ByVal sender As object, ByVal
args As DataColumnChangeEventArgs) Handles PartPlant_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Select Case args.Column.ColumnName

Case "LeadTime"
Dim edvPartPlant As EpiDataView =
CType(oTrans.EpiDataViews("PartPlant"), EpiDataView)
Dim intLeadTime As Int32 =
edvPartPlant.dataView(edvPartPlant.Row)("LeadTime")
Dim edvPart As EpiDataView =
CType(oTrans.EpiDataViews("Part"), EpiDataView)
edvPart.dataView(edvPart.Row)("Number20") = intLeadTime
edvPart.Notify( New EpiNotifyArgs(oTrans, edvPart.Row,
edvPart.Column) )
Case Else

End Select

End Sub

Be careful for line wraps.

I am assuming here you are using Number20 in the Part table. If you are
using a different field and having trouble, I can tailor it if needed.

Hope this helps,
Ross


-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
cooner_55421
Sent: Wednesday, June 23, 2010 2:39 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Call for a simple? example

Hi,

Help... I am looking for an example.

When I update the lead-time in the Part Plant screen, I would like the
system to copy that value and use it to update a user defined field in the
Part table.

Would you use a BPM, screen customization, something else?


Thanks in advance.

Bruce



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

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
Bruce,

My BPM note isn't true. I wasn't thinking clearly and was remembering an object bug I was working with in the past.

A BPM will work fine as well. The difference is that it runs server-side and will trigger on the Part.Update method.

The visual difference is that the value will not change in your Part UD field until the part is saved. Using a customization will reflect the change at the interface as soon as the field is changed.

If you would rather go this route let me know and I can provide an example.

Ross

--- In vantage@yahoogroups.com, "Ross Hughes" <ross.hughes@...> wrote:
>
> Hi Bruce,
>
> I would do this as a client customization because you want the part field to
> change right after the lead time field changes. BPM's trigger on
> object/methods and not field changes. A multi-plant scenario may give
> unpredictable results.
>
> I wrote something that should work for you. Create a part customization and
> paste the following code right before the final End Module line.
>
> Private Sub PartPlant_AfterFieldChange(ByVal sender As object, ByVal
> args As DataColumnChangeEventArgs) Handles PartPlant_Column.ColumnChanged
> '// ** Argument Properties and Uses **
> '// args.Row("[FieldName]")
> '// args.Column, args.ProposedValue, args.Row
> '
> 'Add Event Handler Code
> '
> Select Case args.Column.ColumnName
>
> Case "LeadTime"
> Dim edvPartPlant As EpiDataView =
> CType(oTrans.EpiDataViews("PartPlant"), EpiDataView)
> Dim intLeadTime As Int32 =
> edvPartPlant.dataView(edvPartPlant.Row)("LeadTime")
> Dim edvPart As EpiDataView =
> CType(oTrans.EpiDataViews("Part"), EpiDataView)
> edvPart.dataView(edvPart.Row)("Number20") = intLeadTime
> edvPart.Notify( New EpiNotifyArgs(oTrans, edvPart.Row,
> edvPart.Column) )
> Case Else
>
> End Select
>
> End Sub
>
> Be careful for line wraps.
>
> I am assuming here you are using Number20 in the Part table. If you are
> using a different field and having trouble, I can tailor it if needed.
>
> Hope this helps,
> Ross
>
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> cooner_55421
> Sent: Wednesday, June 23, 2010 2:39 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Call for a simple? example
>
> Hi,
>
> Help... I am looking for an example.
>
> When I update the lead-time in the Part Plant screen, I would like the
> system to copy that value and use it to update a user defined field in the
> Part table.
>
> Would you use a BPM, screen customization, something else?
>
>
> Thanks in advance.
>
> Bruce
>
>
>
> ------------------------------------
>
> 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
>