VB Code help... looks sloppy to me

Jeremy,
As I stated before do the code in a BPM and it will be as efficient as
possible in terms of Performance.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Wed, Mar 27, 2013 at 2:16 PM, chan213419 <chan213419@...> wrote:

> **
>
>
> Thanks for all your help everyone!
>
> This UD will have CustID's saved to it that are considered "Return To
> Customers". I believe Mr. Giese is correct in that these records should be
> built into the Customer Maintenance screen negating the need for the
> Bor.GetRows portion of the code. The code below, thanks to Mr. tkoch77,
> worked. After brainstorming more over this and paying close attention to
> Jose's mention of performance issues I am beginning to wonder if the code
> below is efficient. Certainly it's more efficient than my fist crack, but
> now I am wondering if I have to use the BoReader at all. What do you guys
> think?
>
>
> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> ByVal args As EpiNotifyArgs)
> If (args.Row > -1 AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
>
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'",
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc,
> ("Name,Address1,Address2,Address3,City,State,Zip,Country"))
>
> If ds.Tables(0).Rows.Count > 0 Then
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)("Name") &
> Environment.NewLine & ds.Tables(0).Rows(0)("Address1") &
> ds.Tables(0).Rows(0)("Address2") & Environment.NewLine &
> ds.Tables(0).Rows(0)("Address3") & Environment.NewLine &
> ds.Tables(0).Rows(0)("City") & Environment.NewLine &
> ds.Tables(0).Rows(0)("State") & Environment.NewLine &
> ds.Tables(0).Rows(0)("Zip") & Environment.NewLine &
> ds.Tables(0).Rows(0)("Country")
> End If
> End IF
>
> End Sub
>
>
> --- In vantage@yahoogroups.com, Joshua Giese <jgiese@...> wrote:
> >
> > What will the UD field be used for? Epicor already has linking from
> customer record to customer record built in depending on what you are
> trying to do
> >
> >
> >
> > Joshua Giese
> >
> > CTO
> >
> > 920.437.6400 Ext. 337
> >
> > Site ID: 27450-E905700B2-SQL64
> >
> > ----- Original Message -----
> >
> > From: "chan213419" <chan213419@...>
> > To: vantage@yahoogroups.com
> > Sent: Wednesday, March 27, 2013 8:33:30 AM
> > Subject: [Vantage] Re: VB Code help... looks sloppy to me
> >
> >
> >
> > Customer Maintenance screen. Goal: populate a UD field (ShortChar05)
> with another CustID, and display address information for that UD-CustID
> (need to keep UD-CustID totally separate with CustID loaded in Customer
> Maintenance screen).
> >
> > It does work... but as Jose pointed out, I am hitting the server
> multiple times for the same thing... I don't want to slow their system down
> with something so simple.
> >
> > Thanks sir!
> >
> > --- In vantage@yahoogroups.com , Joshua Giese <jgiese@> wrote:
> > >
> > > Ha it's certainly a good attempt but a bit sloppy yes. Let's start
> with what screen that is in? Depending what you have available to you you
> might be able to really sand this down to something simple
> > >
> > >
> > >
> > > Joshua Giese
> > >
> > > CTO
> > >
> > > 920.437.6400 Ext. 337
> > >
> > > Site ID: 27450-E905700B2-SQL64
> > >
> > > ----- Original Message -----
> > >
> > > From: "chan213419" <chan213419@>
> > > To: vantage@yahoogroups.com
> > > Sent: Wednesday, March 27, 2013 8:06:35 AM
> > > Subject: [Vantage] VB Code help... looks sloppy to me
> > >
> > >
> > >
> > > Good morning!
> > >
> > > I achieved creating a textbox that displays multiple fields (address
> fields). The code below is how I got it to work. As you can see I am
> linking/writing column individually (see dim ds1-7). I believe there should
> be a simpler way. Instead of coding each column, can I condense this into
> one line? Like I said, the code works but I am looking for a simpler way to
> code this.
> > >
> > > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> ByVal args As EpiNotifyArgs)
> > >
> > > If (args.Row > -1 AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > > Dim wc as String = String.Format("CustID = '{0}'",
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > > If ds.Tables(0).Rows.Count > 0 Then
> > >
> > > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> > > End If
> > > End IF
> > >
> > > If (args.Row > -1)
> > > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > > txtboxLIMSRetToAddr.Value = ""
> > > End IF
> > > End If
> > >
> > > End Sub
> > >
> > >
> > >
> > >
> > >
> > > [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]
Good morning!

I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.

Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)

If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
If ds.Tables(0).Rows.Count > 0 Then

txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
End If
End IF

If (args.Row > -1)
IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
txtboxLIMSRetToAddr.Value = ""
End IF
End If

End Sub
A few pointers

1) You can re-use a variable they are not final so you can use the same
data set and assign multiple values

A variable such as
Dim i AS Integer
i=0
can also be
i=2
i=3 etc... no need to decalre 7 different integers to use it just once.

2) Bo.GetRows takes a list of fields so you don't have to call that
function more than once, simply pass it a list of the fields you want and
it will return a table with all the fields. After that you can loop through
the fields concatenating them into one string using a basic for loop or
while loop

4) Also it should be noted (I dont know what screen you are on) but you
already have edvCustomer so usually all these fields are available in the
data view, and if they are not you can add an FKV which will bring these
fields to you instead of doing a lookup yourself.


5) If you are not familiar with data views and how they work they ahve a
flew classes at insights that might help


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Wed, Mar 27, 2013 at 9:06 AM, chan213419 <chan213419@...> wrote:

> **
>
>
> Good morning!
>
> I achieved creating a textbox that displays multiple fields (address
> fields). The code below is how I got it to work. As you can see I am
> linking/writing column individually (see dim ds1-7). I believe there should
> be a simpler way. Instead of coding each column, can I condense this into
> one line? Like I said, the code works but I am looking for a simpler way to
> code this.
>
> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> ByVal args As EpiNotifyArgs)
>
> If (args.Row > -1 AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'",
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> If ds.Tables(0).Rows.Count > 0 Then
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine
> & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0)
> & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds7.Tables(0).Rows(0)(0)
> End If
> End IF
>
> If (args.Row > -1)
> IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> txtboxLIMSRetToAddr.Value = ""
> End IF
> End If
>
> End Sub
>
>
>


[Non-text portions of this message have been removed]
Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple



Joshua Giese

CTO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

----- Original Message -----

From: "chan213419" <chan213419@...>
To: vantage@yahoogroups.com
Sent: Wednesday, March 27, 2013 8:06:35 AM
Subject: [Vantage] VB Code help... looks sloppy to me



Good morning!

I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.

Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)

If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
If ds.Tables(0).Rows.Count > 0 Then

txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
End If
End IF

If (args.Row > -1)
IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
txtboxLIMSRetToAddr.Value = ""
End IF
End If

End Sub





[Non-text portions of this message have been removed]
I also forgot to point out that by called Bo.GetRows multiple times you are
making a trip to the server and back every time, the performance hit of
this is huge! Try to go to the server only once and get as much as what
you'll need! Performance is king when it comes to Epicor.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Wed, Mar 27, 2013 at 9:18 AM, Jose Gomez <jose@...> wrote:

> A few pointers
>
> 1) You can re-use a variable they are not final so you can use the same
> data set and assign multiple values
>
> A variable such as
> Dim i AS Integer
> i=0
> can also be
> i=2
> i=3 etc... no need to decalre 7 different integers to use it just once.
>
> 2) Bo.GetRows takes a list of fields so you don't have to call that
> function more than once, simply pass it a list of the fields you want and
> it will return a table with all the fields. After that you can loop through
> the fields concatenating them into one string using a basic for loop or
> while loop
>
> 4) Also it should be noted (I dont know what screen you are on) but you
> already have edvCustomer so usually all these fields are available in the
> data view, and if they are not you can add an FKV which will bring these
> fields to you instead of doing a lookup yourself.
>
>
> 5) If you are not familiar with data views and how they work they ahve a
> flew classes at insights that might help
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Wed, Mar 27, 2013 at 9:06 AM, chan213419 <chan213419@...> wrote:
>
>> **
>>
>>
>> Good morning!
>>
>> I achieved creating a textbox that displays multiple fields (address
>> fields). The code below is how I got it to work. As you can see I am
>> linking/writing column individually (see dim ds1-7). I believe there should
>> be a simpler way. Instead of coding each column, can I condense this into
>> one line? Like I said, the code works but I am looking for a simpler way to
>> code this.
>>
>> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
>> ByVal args As EpiNotifyArgs)
>>
>> If (args.Row > -1 AndAlso
>> edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
>> edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
>> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
>> Dim wc as String = String.Format("CustID = '{0}'",
>> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
>> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
>> Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
>> Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
>> Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
>> Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
>> Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
>> Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
>> Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
>> If ds.Tables(0).Rows.Count > 0 Then
>>
>> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine
>> & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0)
>> & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine &
>> ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) &
>> Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine &
>> ds7.Tables(0).Rows(0)(0)
>> End If
>> End IF
>>
>> If (args.Row > -1)
>> IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
>> txtboxLIMSRetToAddr.Value = ""
>> End IF
>> End If
>>
>> End Sub
>>
>>
>>
>
>


[Non-text portions of this message have been removed]
Thanks so much Jose!

I follow you on not having to run the BO.GetRows more than once, what I don't understand is how to code returning multiple fields from that result. I tried below but I got many different errors, and when I didn't get errors it would only return the FIRST (Name) result and display that only.

Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
Dim ds as DataSet = bor.GetRows("Customer", wc, "Name" & "City" & "Country")

If ds.Tables(0).Rows.Count > 0 Then txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0)

Do you know where I went wrong above?

Thanks sir!

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> A few pointers
>
> 1) You can re-use a variable they are not final so you can use the same
> data set and assign multiple values
>
> A variable such as
> Dim i AS Integer
> i=0
> can also be
> i=2
> i=3 etc... no need to decalre 7 different integers to use it just once.
>
> 2) Bo.GetRows takes a list of fields so you don't have to call that
> function more than once, simply pass it a list of the fields you want and
> it will return a table with all the fields. After that you can loop through
> the fields concatenating them into one string using a basic for loop or
> while loop
>
> 4) Also it should be noted (I dont know what screen you are on) but you
> already have edvCustomer so usually all these fields are available in the
> data view, and if they are not you can add an FKV which will bring these
> fields to you instead of doing a lookup yourself.
>
>
> 5) If you are not familiar with data views and how they work they ahve a
> flew classes at insights that might help
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Wed, Mar 27, 2013 at 9:06 AM, chan213419 <chan213419@...> wrote:
>
> > **
> >
> >
> > Good morning!
> >
> > I achieved creating a textbox that displays multiple fields (address
> > fields). The code below is how I got it to work. As you can see I am
> > linking/writing column individually (see dim ds1-7). I believe there should
> > be a simpler way. Instead of coding each column, can I condense this into
> > one line? Like I said, the code works but I am looking for a simpler way to
> > code this.
> >
> > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> > ByVal args As EpiNotifyArgs)
> >
> > If (args.Row > -1 AndAlso
> > edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> > edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > Dim wc as String = String.Format("CustID = '{0}'",
> > edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > If ds.Tables(0).Rows.Count > 0 Then
> >
> > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine
> > & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0)
> > & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine &
> > ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) &
> > Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine &
> > ds7.Tables(0).Rows(0)(0)
> > End If
> > End IF
> >
> > If (args.Row > -1)
> > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > txtboxLIMSRetToAddr.Value = ""
> > End IF
> > End If
> >
> > End Sub
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
the Signature on the BO should tell you this, but it is
Adapter, WhereClause, FieldListCommaSeparated


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Wed, Mar 27, 2013 at 9:28 AM, chan213419 <chan213419@...> wrote:

> **
>
>
> Thanks so much Jose!
>
> I follow you on not having to run the BO.GetRows more than once, what I
> don't understand is how to code returning multiple fields from that result.
> I tried below but I got many different errors, and when I didn't get errors
> it would only return the FIRST (Name) result and display that only.
>
>
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'",
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name" & "City" &
> "Country")
>
>
> If ds.Tables(0).Rows.Count > 0 Then txtboxLIMSRetToAddr.Value =
> ds.Tables(0).Rows(0)(0)
>
> Do you know where I went wrong above?
>
> Thanks sir!
>
>
> --- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
> >
> > A few pointers
> >
> > 1) You can re-use a variable they are not final so you can use the same
> > data set and assign multiple values
> >
> > A variable such as
> > Dim i AS Integer
> > i=0
> > can also be
> > i=2
> > i=3 etc... no need to decalre 7 different integers to use it just once.
> >
> > 2) Bo.GetRows takes a list of fields so you don't have to call that
> > function more than once, simply pass it a list of the fields you want and
> > it will return a table with all the fields. After that you can loop
> through
> > the fields concatenating them into one string using a basic for loop or
> > while loop
> >
> > 4) Also it should be noted (I dont know what screen you are on) but you
> > already have edvCustomer so usually all these fields are available in the
> > data view, and if they are not you can add an FKV which will bring these
> > fields to you instead of doing a lookup yourself.
> >
> >
> > 5) If you are not familiar with data views and how they work they ahve a
> > flew classes at insights that might help
> >
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomezhttp://www.facebook.com/josegomez>
> > <http://www.google.com/profiles/jose.gomezhttp://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> > On Wed, Mar 27, 2013 at 9:06 AM, chan213419 <chan213419@...> wrote:
> >
> > > **
>
> > >
> > >
> > > Good morning!
> > >
> > > I achieved creating a textbox that displays multiple fields (address
> > > fields). The code below is how I got it to work. As you can see I am
> > > linking/writing column individually (see dim ds1-7). I believe there
> should
> > > be a simpler way. Instead of coding each column, can I condense this
> into
> > > one line? Like I said, the code works but I am looking for a simpler
> way to
> > > code this.
> > >
> > > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> > > ByVal args As EpiNotifyArgs)
> > >
> > > If (args.Row > -1 AndAlso
> > > edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> > > edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > > Dim wc as String = String.Format("CustID = '{0}'",
> > > edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > > If ds.Tables(0).Rows.Count > 0 Then
> > >
> > > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) &
> Environment.NewLine
> > > & ds1.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds2.Tables(0).Rows(0)(0)
> > > & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine
> &
> > > ds4.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds5.Tables(0).Rows(0)(0) &
> > > Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine &
> > > ds7.Tables(0).Rows(0)(0)
> > > End If
> > > End IF
> > >
> > > If (args.Row > -1)
> > > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > > txtboxLIMSRetToAddr.Value = ""
> > > End IF
> > > End If
> > >
> > > End Sub
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
Do a search on the user group for GetRows and you will find tons of examples of it's proper use :)

http://lmgtfy.com/?q=Epicor+GetRows



Joshua Giese

CTO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

----- Original Message -----

From: "chan213419" <chan213419@...>
To: vantage@yahoogroups.com
Sent: Wednesday, March 27, 2013 8:28:37 AM
Subject: [Vantage] Re: VB Code help... looks sloppy to me



Thanks so much Jose!

I follow you on not having to run the BO.GetRows more than once, what I don't understand is how to code returning multiple fields from that result. I tried below but I got many different errors, and when I didn't get errors it would only return the FIRST (Name) result and display that only.

Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
Dim ds as DataSet = bor.GetRows("Customer", wc, "Name" & "City" & "Country")

If ds.Tables(0).Rows.Count > 0 Then txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0)

Do you know where I went wrong above?

Thanks sir!

--- In vantage@yahoogroups.com , Jose Gomez <jose@...> wrote:
>
> A few pointers
>
> 1) You can re-use a variable they are not final so you can use the same
> data set and assign multiple values
>
> A variable such as
> Dim i AS Integer
> i=0
> can also be
> i=2
> i=3 etc... no need to decalre 7 different integers to use it just once.
>
> 2) Bo.GetRows takes a list of fields so you don't have to call that
> function more than once, simply pass it a list of the fields you want and
> it will return a table with all the fields. After that you can loop through
> the fields concatenating them into one string using a basic for loop or
> while loop
>
> 4) Also it should be noted (I dont know what screen you are on) but you
> already have edvCustomer so usually all these fields are available in the
> data view, and if they are not you can add an FKV which will bring these
> fields to you instead of doing a lookup yourself.
>
>
> 5) If you are not familiar with data views and how they work they ahve a
> flew classes at insights that might help
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> < http://www.linkedin.com/in/josecgomez http://www.facebook.com/josegomez >
> < http://www.google.com/profiles/jose.gomez http://www.twitter.com/joc85 >
> < http://www.josecgomez.com/professional-resume/ >
> < http://www.josecgomez.com/feed/ >
> < http://www.usdoingstuff.com >
>
> *Quis custodiet ipsos custodes?*
>
>
> On Wed, Mar 27, 2013 at 9:06 AM, chan213419 <chan213419@...> wrote:
>
> > **
> >
> >
> > Good morning!
> >
> > I achieved creating a textbox that displays multiple fields (address
> > fields). The code below is how I got it to work. As you can see I am
> > linking/writing column individually (see dim ds1-7). I believe there should
> > be a simpler way. Instead of coding each column, can I condense this into
> > one line? Like I said, the code works but I am looking for a simpler way to
> > code this.
> >
> > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> > ByVal args As EpiNotifyArgs)
> >
> > If (args.Row > -1 AndAlso
> > edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> > edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > Dim wc as String = String.Format("CustID = '{0}'",
> > edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > If ds.Tables(0).Rows.Count > 0 Then
> >
> > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine
> > & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0)
> > & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine &
> > ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) &
> > Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine &
> > ds7.Tables(0).Rows(0)(0)
> > End If
> > End IF
> >
> > If (args.Row > -1)
> > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > txtboxLIMSRetToAddr.Value = ""
> > End IF
> > End If
> >
> > End Sub
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with another CustID, and display address information for that UD-CustID (need to keep UD-CustID totally separate with CustID loaded in Customer Maintenance screen).

It does work... but as Jose pointed out, I am hitting the server multiple times for the same thing... I don't want to slow their system down with something so simple.

Thanks sir!

--- In vantage@yahoogroups.com, Joshua Giese <jgiese@...> wrote:
>
> Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple
>
>
>
> Joshua Giese
>
> CTO
>
> 920.437.6400 Ext. 337
>
> Site ID: 27450-E905700B2-SQL64
>
> ----- Original Message -----
>
> From: "chan213419" <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 8:06:35 AM
> Subject: [Vantage] VB Code help... looks sloppy to me
>
>
>
> Good morning!
>
> I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.
>
> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
>
> If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> If ds.Tables(0).Rows.Count > 0 Then
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> End If
> End IF
>
> If (args.Row > -1)
> IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> txtboxLIMSRetToAddr.Value = ""
> End IF
> End If
>
> End Sub
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
What will the UD field be used for? Epicor already has linking from customer record to customer record built in depending on what you are trying to do



Joshua Giese

CTO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

----- Original Message -----

From: "chan213419" <chan213419@...>
To: vantage@yahoogroups.com
Sent: Wednesday, March 27, 2013 8:33:30 AM
Subject: [Vantage] Re: VB Code help... looks sloppy to me



Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with another CustID, and display address information for that UD-CustID (need to keep UD-CustID totally separate with CustID loaded in Customer Maintenance screen).

It does work... but as Jose pointed out, I am hitting the server multiple times for the same thing... I don't want to slow their system down with something so simple.

Thanks sir!

--- In vantage@yahoogroups.com , Joshua Giese <jgiese@...> wrote:
>
> Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple
>
>
>
> Joshua Giese
>
> CTO
>
> 920.437.6400 Ext. 337
>
> Site ID: 27450-E905700B2-SQL64
>
> ----- Original Message -----
>
> From: "chan213419" <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 8:06:35 AM
> Subject: [Vantage] VB Code help... looks sloppy to me
>
>
>
> Good morning!
>
> I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.
>
> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
>
> If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> If ds.Tables(0).Rows.Count > 0 Then
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> End If
> End IF
>
> If (args.Row > -1)
> IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> txtboxLIMSRetToAddr.Value = ""
> End IF
> End If
>
> End Sub
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Try this... not tested

If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
 Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
 Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
 Dim ds as DataSet = bor.GetRows("Customer", wc, "Name,Address1,Address2,Address3,City,State,Zip,Country")

   If ds.Tables(0).Rows.Count > 0 Then                             Â

txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)("Name") & Environment.NewLine & ds.Tables(0).Rows(0)("Address1") & Environment.NewLine & ds.Tables(0).Rows(0)("Address2") & Environment.NewLine & ds.Tables(0).Rows(0)("Address3") & Environment.NewLine & ds.Tables(0).Rows(0)("City") & Environment.NewLine & ds.Tables(0).Rows(0)("State") & Environment.NewLine & ds.Tables(0).Rows(0)("Zip") & Environment.NewLine & ds.Tables(0).Rows(0)("Country")Â Â Â Â Â Â Â Â




________________________________
From: chan213419 <chan213419@...>
To: vantage@yahoogroups.com
Sent: Wednesday, March 27, 2013 9:33 AM
Subject: [Vantage] Re: VB Code help... looks sloppy to me

Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with another CustID, and display address information for that UD-CustID (need to keep UD-CustID totally separate with CustID loaded in Customer Maintenance screen).

It does work... but as Jose pointed out, I am hitting the server multiple times for the same thing... I don't want to slow their system down with something so simple.

Thanks sir!

--- In vantage@yahoogroups.com, Joshua Giese <jgiese@...> wrote:
>
> Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple
>
>
>
> Joshua Giese
>
> CTO
>
> 920.437.6400 Ext. 337
>
> Site ID: 27450-E905700B2-SQL64
>
> ----- Original Message -----
>
> From: "chan213419" <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 8:06:35 AM
> Subject: [Vantage] VB Code help... looks sloppy to me
>
>
>
> Good morning!
>
> I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.
>
> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
>
> If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> If ds.Tables(0).Rows.Count > 0 Then
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> End If
> End IF
>
> If (args.Row > -1)
> IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> txtboxLIMSRetToAddr.Value = ""
> End IF
> End If
>
> End Sub
>

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




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

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/.%c2%a0
(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



[Non-text portions of this message have been removed]
Jeremy
Ideally since ShortShar05 already contains the other customer id, you
should not have to go to the server at all. On the Actual Customers Get By
Id Call, you should within a Post Proc BPM Gather the information you want
(since you are already on the server) This will improve performance and
make the code ubiquitous across the board.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Wed, Mar 27, 2013 at 9:51 AM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> Try this... not tested
>
>
> If (args.Row > -1 AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'",
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc,
> "Name,Address1,Address2,Address3,City,State,Zip,Country")
>
> If ds.Tables(0).Rows.Count > 0 Then
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)("Name") &
> Environment.NewLine & ds.Tables(0).Rows(0)("Address1") &
> Environment.NewLine & ds.Tables(0).Rows(0)("Address2") &
> Environment.NewLine & ds.Tables(0).Rows(0)("Address3") &
> Environment.NewLine & ds.Tables(0).Rows(0)("City") & Environment.NewLine &
> ds.Tables(0).Rows(0)("State") & Environment.NewLine &
> ds.Tables(0).Rows(0)("Zip") & Environment.NewLine &
> ds.Tables(0).Rows(0)("Country")
>
> ________________________________
> From: chan213419 <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 9:33 AM
> Subject: [Vantage] Re: VB Code help... looks sloppy to me
>
>
> Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with
> another CustID, and display address information for that UD-CustID (need to
> keep UD-CustID totally separate with CustID loaded in Customer Maintenance
> screen).
>
> It does work... but as Jose pointed out, I am hitting the server multiple
> times for the same thing... I don't want to slow their system down with
> something so simple.
>
> Thanks sir!
>
> --- In vantage@yahoogroups.com, Joshua Giese <jgiese@...> wrote:
> >
> > Ha it's certainly a good attempt but a bit sloppy yes. Let's start with
> what screen that is in? Depending what you have available to you you might
> be able to really sand this down to something simple
> >
> >
> >
> > Joshua Giese
> >
> > CTO
> >
> > 920.437.6400 Ext. 337
> >
> > Site ID: 27450-E905700B2-SQL64
> >
> > ----- Original Message -----
> >
> > From: "chan213419" <chan213419@...>
> > To: vantage@yahoogroups.com
> > Sent: Wednesday, March 27, 2013 8:06:35 AM
> > Subject: [Vantage] VB Code help... looks sloppy to me
> >
> >
> >
> > Good morning!
> >
> > I achieved creating a textbox that displays multiple fields (address
> fields). The code below is how I got it to work. As you can see I am
> linking/writing column individually (see dim ds1-7). I believe there should
> be a simpler way. Instead of coding each column, can I condense this into
> one line? Like I said, the code works but I am looking for a simpler way to
> code this.
> >
> > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView,
> ByVal args As EpiNotifyArgs)
> >
> > If (args.Row > -1 AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso
> edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > Dim wc as String = String.Format("CustID = '{0}'",
> edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > If ds.Tables(0).Rows.Count > 0 Then
> >
> > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine &
> ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) &
> Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> > End If
> > End IF
> >
> > If (args.Row > -1)
> > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > txtboxLIMSRetToAddr.Value = ""
> > End IF
> > End If
> >
> > End Sub
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> ------------------------------------
>
>
> 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
>
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Alternatively you could set the dataview field instead of the textbox.

DataRow drEdvCust = edvCustomer.DataView(edvCustomer.Row);

If (args.Row > -1 && dr Edv Cust[ "ShortChar05"] != "" && dr Edv Cust[ "ShortChar06"] == "")
{
BOReader boReader = new BOReader(oTrans.Session.ConnectionPool);
string where = string.Format("CustID = '{0}'", dr Edv Cust[ "ShortChar05"]);
DataSet dsCust = boReader.GetRows("Customer", where, "Name,Address1,Address2,Address3,City,State,Zip,Country");

If (dsCust.Tables[0].Rows.Count > 0)
{
DataRow drOtherCust = ds.Tables[0].Rows[0];
dr Edv Cust[ "ShortChar06"] = string.Format("{0} \r\n{1} \r\n{2} \r\n{3} \r\n{4}, {5} {6} \r\n{7}", drOtherCust[ "Name"], drOtherCust[ "Address1"] , drOtherCust[ "Address2"], drOtherCust[ "Address3"], drOtherCust[ "City"], drOtherCust[ "State"], drOtherCust[ "Zip"], drOtherCust[ "Country"]);
edvCustomer.Notify(new EpiNotifyArgs(oTrans, edvCustomer.Row, edvCustomer.Column);
}
}




Joshua Giese

CTO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

----- Original Message -----

From: "Ted Koch" <tkoch77@...>
To: vantage@yahoogroups.com
Sent: Wednesday, March 27, 2013 8:51:50 AM
Subject: Re: [Vantage] Re: VB Code help... looks sloppy to me



Try this... not tested

If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
Dim ds as DataSet = bor.GetRows("Customer", wc, "Name,Address1,Address2,Address3,City,State,Zip,Country")

If ds.Tables(0).Rows.Count > 0 Then

txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)("Name") & Environment.NewLine & ds.Tables(0).Rows(0)("Address1") & Environment.NewLine & ds.Tables(0).Rows(0)("Address2") & Environment.NewLine & ds.Tables(0).Rows(0)("Address3") & Environment.NewLine & ds.Tables(0).Rows(0)("City") & Environment.NewLine & ds.Tables(0).Rows(0)("State") & Environment.NewLine & ds.Tables(0).Rows(0)("Zip") & Environment.NewLine & ds.Tables(0).Rows(0)("Country")

________________________________
From: chan213419 < chan213419@... >
To: vantage@yahoogroups.com
Sent: Wednesday, March 27, 2013 9:33 AM
Subject: [Vantage] Re: VB Code help... looks sloppy to me

Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with another CustID, and display address information for that UD-CustID (need to keep UD-CustID totally separate with CustID loaded in Customer Maintenance screen).

It does work... but as Jose pointed out, I am hitting the server multiple times for the same thing... I don't want to slow their system down with something so simple.

Thanks sir!

--- In vantage@yahoogroups.com , Joshua Giese <jgiese@...> wrote:
>
> Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple
>
>
>
> Joshua Giese
>
> CTO
>
> 920.437.6400 Ext. 337
>
> Site ID: 27450-E905700B2-SQL64
>
> ----- Original Message -----
>
> From: "chan213419" <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 8:06:35 AM
> Subject: [Vantage] VB Code help... looks sloppy to me
>
>
>
> Good morning!
>
> I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.
>
> Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
>
> If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> If ds.Tables(0).Rows.Count > 0 Then
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> End If
> End IF
>
> If (args.Row > -1)
> IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> txtboxLIMSRetToAddr.Value = ""
> End IF
> End If
>
> End Sub
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

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

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

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





[Non-text portions of this message have been removed]
Thanks for all your help everyone!

This UD will have CustID's saved to it that are considered "Return To Customers". I believe Mr. Giese is correct in that these records should be built into the Customer Maintenance screen negating the need for the Bor.GetRows portion of the code. The code below, thanks to Mr. tkoch77, worked. After brainstorming more over this and paying close attention to Jose's mention of performance issues I am beginning to wonder if the code below is efficient. Certainly it's more efficient than my fist crack, but now I am wondering if I have to use the BoReader at all. What do you guys think?

Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then

Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
Dim ds as DataSet = bor.GetRows("Customer", wc, ("Name,Address1,Address2,Address3,City,State,Zip,Country"))

If ds.Tables(0).Rows.Count > 0 Then
txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)("Name") & Environment.NewLine & ds.Tables(0).Rows(0)("Address1") & ds.Tables(0).Rows(0)("Address2") & Environment.NewLine & ds.Tables(0).Rows(0)("Address3") & Environment.NewLine & ds.Tables(0).Rows(0)("City") & Environment.NewLine & ds.Tables(0).Rows(0)("State") & Environment.NewLine & ds.Tables(0).Rows(0)("Zip") & Environment.NewLine & ds.Tables(0).Rows(0)("Country")
End If
End IF

End Sub

--- In vantage@yahoogroups.com, Joshua Giese <jgiese@...> wrote:
>
> What will the UD field be used for? Epicor already has linking from customer record to customer record built in depending on what you are trying to do
>
>
>
> Joshua Giese
>
> CTO
>
> 920.437.6400 Ext. 337
>
> Site ID: 27450-E905700B2-SQL64
>
> ----- Original Message -----
>
> From: "chan213419" <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 8:33:30 AM
> Subject: [Vantage] Re: VB Code help... looks sloppy to me
>
>
>
> Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with another CustID, and display address information for that UD-CustID (need to keep UD-CustID totally separate with CustID loaded in Customer Maintenance screen).
>
> It does work... but as Jose pointed out, I am hitting the server multiple times for the same thing... I don't want to slow their system down with something so simple.
>
> Thanks sir!
>
> --- In vantage@yahoogroups.com , Joshua Giese <jgiese@> wrote:
> >
> > Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple
> >
> >
> >
> > Joshua Giese
> >
> > CTO
> >
> > 920.437.6400 Ext. 337
> >
> > Site ID: 27450-E905700B2-SQL64
> >
> > ----- Original Message -----
> >
> > From: "chan213419" <chan213419@>
> > To: vantage@yahoogroups.com
> > Sent: Wednesday, March 27, 2013 8:06:35 AM
> > Subject: [Vantage] VB Code help... looks sloppy to me
> >
> >
> >
> > Good morning!
> >
> > I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.
> >
> > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
> >
> > If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > If ds.Tables(0).Rows.Count > 0 Then
> >
> > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> > End If
> > End IF
> >
> > If (args.Row > -1)
> > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > txtboxLIMSRetToAddr.Value = ""
> > End IF
> > End If
> >
> > End Sub
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Thank you very much Mr. koch! This worked wonderfully!

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> Try this... not tested
>
> If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> Â Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Â Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> Â Dim ds as DataSet = bor.GetRows("Customer", wc, "Name,Address1,Address2,Address3,City,State,Zip,Country")
>
>    If ds.Tables(0).Rows.Count > 0 Then                             Â
>
> txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)("Name") & Environment.NewLine & ds.Tables(0).Rows(0)("Address1") & Environment.NewLine & ds.Tables(0).Rows(0)("Address2") & Environment.NewLine & ds.Tables(0).Rows(0)("Address3") & Environment.NewLine & ds.Tables(0).Rows(0)("City") & Environment.NewLine & ds.Tables(0).Rows(0)("State") & Environment.NewLine & ds.Tables(0).Rows(0)("Zip") & Environment.NewLine & ds.Tables(0).Rows(0)("Country")Â Â Â Â Â Â Â Â
>
>
>
>
> ________________________________
> From: chan213419 <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, March 27, 2013 9:33 AM
> Subject: [Vantage] Re: VB Code help... looks sloppy to me
>
> Customer Maintenance screen. Goal: populate a UD field (ShortChar05) with another CustID, and display address information for that UD-CustID (need to keep UD-CustID totally separate with CustID loaded in Customer Maintenance screen).
>
> It does work... but as Jose pointed out, I am hitting the server multiple times for the same thing... I don't want to slow their system down with something so simple.
>
> Thanks sir!
>
> --- In vantage@yahoogroups.com, Joshua Giese <jgiese@> wrote:
> >
> > Ha it's certainly a good attempt but a bit sloppy yes. Let's start with what screen that is in? Depending what you have available to you you might be able to really sand this down to something simple
> >
> >
> >
> > Joshua Giese
> >
> > CTO
> >
> > 920.437.6400 Ext. 337
> >
> > Site ID: 27450-E905700B2-SQL64
> >
> > ----- Original Message -----
> >
> > From: "chan213419" <chan213419@>
> > To: vantage@yahoogroups.com
> > Sent: Wednesday, March 27, 2013 8:06:35 AM
> > Subject: [Vantage] VB Code help... looks sloppy to me
> >
> >
> >
> > Good morning!
> >
> > I achieved creating a textbox that displays multiple fields (address fields). The code below is how I got it to work. As you can see I am linking/writing column individually (see dim ds1-7). I believe there should be a simpler way. Instead of coding each column, can I condense this into one line? Like I said, the code works but I am looking for a simpler way to code this.
> >
> > Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
> >
> > If (args.Row > -1 AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar05") <> "" AndAlso edvCustomer.DataView(edvCustomer.Row)("ShortChar06") = "") Then
> > Dim bor As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > Dim wc as String = String.Format("CustID = '{0}'", edvCustomer.DataView(edvCustomer.Row)("ShortChar05"))
> > Dim ds as DataSet = bor.GetRows("Customer", wc, "Name")
> > Dim ds1 as DataSet = bor.GetRows("Customer", wc, "Address1")
> > Dim ds2 as DataSet = bor.GetRows("Customer", wc, "Address2")
> > Dim ds3 as DataSet = bor.GetRows("Customer", wc, "Address3")
> > Dim ds4 as DataSet = bor.GetRows("Customer", wc, "City")
> > Dim ds5 as DataSet = bor.GetRows("Customer", wc, "State")
> > Dim ds6 as DataSet = bor.GetRows("Customer", wc, "Zip")
> > Dim ds7 as DataSet = bor.GetRows("Customer", wc, "Country")
> > If ds.Tables(0).Rows.Count > 0 Then
> >
> > txtboxLIMSRetToAddr.Value = ds.Tables(0).Rows(0)(0) & Environment.NewLine & ds1.Tables(0).Rows(0)(0) & Environment.NewLine & ds2.Tables(0).Rows(0)(0) & Environment.NewLine & ds3.Tables(0).Rows(0)(0) & Environment.NewLine & ds4.Tables(0).Rows(0)(0) & Environment.NewLine & ds5.Tables(0).Rows(0)(0) & Environment.NewLine & ds6.Tables(0).Rows(0)(0) & Environment.NewLine & ds7.Tables(0).Rows(0)(0)
> > End If
> > End IF
> >
> > If (args.Row > -1)
> > IF edvCustomer.DataView(edvCustomer.Row)("ShortChar05") = ""
> > txtboxLIMSRetToAddr.Value = ""
> > End IF
> > End If
> >
> > End Sub
> >
> >Â
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
> ------------------------------------
>
> 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/.%c2%a0
> (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
>
>
>
> [Non-text portions of this message have been removed]
>