If Rob's .NET approach is not something that will work for you, I would recommend the following Pre-process BPM Method Directive:
Method: (find the one you want to catch via "Trace Logging")
Condition(s): Set whatever works for you
Action(s): "execute 4GL code"
Script:
For Each ttTableName where (ttTableName.RowMod = 'A' or ttTableName.RowMod = 'U') no-lock.
Find Table2Name where Table2Name.Company = ttTableName.Company and TableName.KeyField = ttTableName.KeyField no-lock.
If not available Table2Name then return.
If available Table2Name then do:
assign ttTableName.TargetField = Table2Name.TargetField.
End.
End.
Replace "TableName", "Table2Name", "KeyField" and "TargetField" with your specific parameters
Note that, depending on what ttTableName you are working with you may not have a RowMod field and, therefore, would not want to include that condition in your script (script will not run if the condition for RowMod is in and the ttTableName has no RowMod field).
Feel free to contact me directly if any further clarification would be helpful.
Thanks,
Nathan Bonner
Total Plastics, Inc.
616.717.1613
bonner.n@...
Method: (find the one you want to catch via "Trace Logging")
Condition(s): Set whatever works for you
Action(s): "execute 4GL code"
Script:
For Each ttTableName where (ttTableName.RowMod = 'A' or ttTableName.RowMod = 'U') no-lock.
Find Table2Name where Table2Name.Company = ttTableName.Company and TableName.KeyField = ttTableName.KeyField no-lock.
If not available Table2Name then return.
If available Table2Name then do:
assign ttTableName.TargetField = Table2Name.TargetField.
End.
End.
Replace "TableName", "Table2Name", "KeyField" and "TargetField" with your specific parameters
Note that, depending on what ttTableName you are working with you may not have a RowMod field and, therefore, would not want to include that condition in your script (script will not run if the condition for RowMod is in and the ttTableName has no RowMod field).
Feel free to contact me directly if any further clarification would be helpful.
Thanks,
Nathan Bonner
Total Plastics, Inc.
616.717.1613
bonner.n@...
--- In vantage@yahoogroups.com, "Rob Bucek" <rbucek@...> wrote:
>
> I am doing that similar thing in a few places. Is the data youre after
> available in one of the views provided within the form youre working in?
> If its not there you could do a foreign key view then something like
>
> Dim edvDtl As EpiDataView = CType(oTrans.EpiDataViews("OrderDtl"),
> EpiDataView)
>
> Dim vOrder As String = edvDtl.dataView(edvDtl.Row)("OrderNum")
>
> Dim edvRel As EpiDataView = CType(oTrans.EpiDataViews("OrderRel"),
> EpiDataView)
>
> edvRel.dataView(edvRel.Row)("ShortChar01") = vOrder
>
>
>
> this assumes you have two views available, one named OrderDtl, and one
> named OrderRel. You could also connect through an adaptor....Im still
> learning the best way to go about things, I can usually accomplish what
> Im attempting to do but it might make more experienced folk shake their
> heads....
>
>
>
>
>
>
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: 715-284-5376 ext 311
>
> FAX: 715-284-4084
>
> <http://www.dsmfg.com/>
>
> (Click the logo to view our site)
>
>
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of b35crile
> Sent: Tuesday, March 24, 2009 6:38 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Customization - Set Field in One Table Equal to Field
> in Another
>
>
>
> I have several customizations I am working on in Vantage 8.03.404B where
> I need to set a field in one table (current screen)equal to a field in
> another table (related screen). I am then using this field (current
> screen) as a Condition in a BPM (Update)to control the desired action. I
> see this as my solution as the BPM does not appear to recognize a field
> from the other table (related screen) in a Condition. Does someone have
> an example of this script? Or does anyone have another solution? In one
> of these customizations, I am trying to get data from the OrderDtl table
> to OrderRel table.
>
>
>
>
>
> [Non-text portions of this message have been removed]
>