Excellent....this example worked really slick...thank you!!! Now I just need to see if I can use the fields that we need. It's a big step in the right direction. Many thanks to all!!
Kurt
Kurt
--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> Well, I could have swore I posted an example of how to do this before, but I searched back 2 yrs and could not find :-(
>
> must be an age related thing.....
>
> Here is some code we are using to add the parent part number field to time phase grid for jobs
>
> This might give you some ideas or point you in the right direction:
>
> Module Script
>
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents edvTimePhas As EpiDataView
>
> '// End Wizard Added Module Level Variables **
>
>
> '// Add Custom Module Level Variables Here **
>
>
>
> Sub InitializeCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
>
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
> edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
> End If
> '// End Custom Method Calls
> End Sub
>
>
>
> Sub DestroyCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
> '// Begin Wizard Added Object Disposal
>
> '// End Wizard Added Object Disposal
> '// Begin Custom Code Disposal
>
> '// End Custom Code Disposal
> End Sub
>
>
>
> Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.EpiViewNotification
> '// ** Argument Properties and Uses **
> '// view.dataView(args.Row)("[FieldName]")
> '// args.Row, args.Column, args.Sender, args.NotifyType
> '// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
> If (args.NotifyType = EpiTransaction.NotifyType.Initialize) Then
> If (args.Row > -1) Then
> AddParentPart()
> End If
> End If
> End Sub
>
> Private Sub AddParentPart()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("JobNum")) Then
> dr("ParentPart") = getParentPart(dr("JobNum"))
> End If
> Next
> End Sub
>
> Private Function getParentPart(ByVal job As String) As String
> Dim parentPart As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "JobNum = '" + job + "'"
> Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
> Else
> parentPart = ""
> End If
>
> Return parentPart
> End Function
>
>
>
>
> End Module
>
>
>
> --- In vantage@yahoogroups.com, "Rob Bucek" <rbucek@> wrote:
> >
> > And if you do find a way to do that Ill pay dearly to know as well... In
> > so far as I've investigated and experimented I don't think there is a
> > way to 'append' columns to existing views. In the end what I did was
> > add an embedded dashboard to another sheet which was driven by the main
> > grid to show what I needed. Not as convenient as adding a column or two
> > but it had the distinction of getting the job done...
> >
> >
> >
> > 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 iusevantage
> > Sent: Thursday, May 21, 2009 8:22 AM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Add fields to Time Phased grid
> >
> >
> >
> >
> >
> > Hi,
> > I'm in the Time Phased form and I need to add a couple fields to to the
> > grid. It uses TimePhas as the datasource. I need to get a field from the
> > Part table included in ('included in' is key here) the TimePhas fields,
> > plus I'd like to also get a Customer field from another table (I'll use
> > any table that would work).
> >
> > I have tried several, well many, attempts using FKV and STV's and I have
> > gotten new views with the Searchword field from the Part table, but it
> > looks like I lose the initial TimePhas fields. Basically I just want to
> > keep the grid as is, but add the Searchword field from the Part table
> > and a Customer field from another table.
> >
> > I have looked at posts from here and from the Vantage site and it all
> > looks the same....just making a FKV where I lose my initial fields. Can
> > this be done? I'm not that adept at Vantage yet and maybe I'm missing
> > something. Any help is much appreciated!!
> >
> > Regards,
> >
> > Kurt
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>