Tricky Foreign Key View

I added the JobHead as a FKV and then added the JobOper as a Sub-Table view.

________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ken Williams
Sent: Friday, February 10, 2012 10:36 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Tricky Foreign Key View



I'm trying to get JobOper.QtyCompleted and JobOper.QtyPer added to the End Activity screen. It would serve as reminders of the quantity required and previous quantity completed for our jobs.

Going into it I thought, simple, FKV and I'm done.

However, I can't seem to get to the JobOper table from the options. The trick is that I need both the JobNum & OprSeq from the "End" table passed through on the FKV, but I can't seem to select two fields to push. I'm assuming this is done through a multi-key view, but I can't seem to figure out the details of that either....

Any suggestions on how to make this view work?

Ken

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





[Non-text portions of this message have been removed]
I'm trying to get JobOper.QtyCompleted and JobOper.QtyPer added to the End Activity screen. It would serve as reminders of the quantity required and previous quantity completed for our jobs.

Going into it I thought, simple, FKV and I'm done.

However, I can't seem to get to the JobOper table from the options. The trick is that I need both the JobNum & OprSeq from the "End" table passed through on the FKV, but I can't seem to select two fields to push. I'm assuming this is done through a multi-key view, but I can't seem to figure out the details of that either....

Any suggestions on how to make this view work?

Ken


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

I struggled with that a bit as well...this is the route I ended up going, granted this was on the end activity..but similar situation..


Dim edvSPA As EpiDataView = CType(oTrans.EpiDataViews("End"), EpiDataView)
Dim nbrQty As EpiNumericEditor = ctype(csm.GetNativeControlReference("f1fdcf24-066d-424e-9b59-319a804854fa"),EpiNumericEditor)
Dim Qty As String = nbrQty.value
Dim vLqty As Decimal = edvSPA.dataView(edvSpa.row)("LaborQty")
Dim vJob As String = edvSPA.dataView(edvSpa.Row)("JobNum")
Dim vAssy As String = edvSPA.dataView(edvSpa.Row)("AssemblySeq")
Dim vOper As String = edvSPA.dataView(edvSpa.Row)("OprSeq")

Dim Total as Integer = 0

Dim adpJO As JobOperSearchAdapter = New JobOperSearchAdapter(EndActForm)
adpJO.BOConnect()

Dim record As Boolean = adpJO.GetByID(vJob, vAssy, vOper)
Dim dsJO As JobOperSearchDataSet = adpJO.JobOperSearchData
Dim vQreq as Integer = dsJO.Tables ("JobOper").Rows(0)("RunQty")
Dim vQcmplt as Integer = dsJO.Tables ("JobOper").Rows(0)("QtyCompleted")
Total = (Qty + vQcmplt)
Dim TQ As String = Total.ToString()
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ken Williams
Sent: Friday, February 10, 2012 12:36 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Tricky Foreign Key View



I'm trying to get JobOper.QtyCompleted and JobOper.QtyPer added to the End Activity screen. It would serve as reminders of the quantity required and previous quantity completed for our jobs.

Going into it I thought, simple, FKV and I'm done.

However, I can't seem to get to the JobOper table from the options. The trick is that I need both the JobNum & OprSeq from the "End" table passed through on the FKV, but I can't seem to select two fields to push. I'm assuming this is done through a multi-key view, but I can't seem to figure out the details of that either....

Any suggestions on how to make this view work?

Ken

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



[Non-text portions of this message have been removed]
Thanks, as always, Rob. I'll give this a try next week and let you know how it goes.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Rob Bucek
Sent: Friday, February 10, 2012 11:51 AM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Tricky Foreign Key View



Ken,

I struggled with that a bit as well...this is the route I ended up going, granted this was on the end activity..but similar situation..

Dim edvSPA As EpiDataView = CType(oTrans.EpiDataViews("End"), EpiDataView)
Dim nbrQty As EpiNumericEditor = ctype(csm.GetNativeControlReference("f1fdcf24-066d-424e-9b59-319a804854fa"),EpiNumericEditor)
Dim Qty As String = nbrQty.value
Dim vLqty As Decimal = edvSPA.dataView(edvSpa.row)("LaborQty")
Dim vJob As String = edvSPA.dataView(edvSpa.Row)("JobNum")
Dim vAssy As String = edvSPA.dataView(edvSpa.Row)("AssemblySeq")
Dim vOper As String = edvSPA.dataView(edvSpa.Row)("OprSeq")

Dim Total as Integer = 0

Dim adpJO As JobOperSearchAdapter = New JobOperSearchAdapter(EndActForm)
adpJO.BOConnect()

Dim record As Boolean = adpJO.GetByID(vJob, vAssy, vOper)
Dim dsJO As JobOperSearchDataSet = adpJO.JobOperSearchData
Dim vQreq as Integer = dsJO.Tables ("JobOper").Rows(0)("RunQty")
Dim vQcmplt as Integer = dsJO.Tables ("JobOper").Rows(0)("QtyCompleted")
Total = (Qty + vQcmplt)
Dim TQ As String = Total.ToString()
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...<mailto:1.234354861%40web65412.mail.ac4.yahoo.com>]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Ken Williams
Sent: Friday, February 10, 2012 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Tricky Foreign Key View

I'm trying to get JobOper.QtyCompleted and JobOper.QtyPer added to the End Activity screen. It would serve as reminders of the quantity required and previous quantity completed for our jobs.

Going into it I thought, simple, FKV and I'm done.

However, I can't seem to get to the JobOper table from the options. The trick is that I need both the JobNum & OprSeq from the "End" table passed through on the FKV, but I can't seem to select two fields to push. I'm assuming this is done through a multi-key view, but I can't seem to figure out the details of that either....

Any suggestions on how to make this view work?

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]