BrowseResultsLayout question...


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
It looks good.  It is hard for me to tell how you are retrieving the data from within the event now, but the best and fastest way (when not included in the SELECT of course) to retrieve data is by using scalar methods.  If you place a packet sniffer on the machine executing the query when using a scalar method, you will see that there is VERY little code that goes across the line and only a single value that comes back....thus it is very fast.  I am glad that you got it working! Smile
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Here is my revised code:

            If Me.LocationsBO1.Seek("LocationID=" & .POLocationID) Then
               e.Values(3).DisplayValue = Me.LocationsBO1.LocationName
            End If

            If Me.ProcessBO1.Seek("ProcessID=" & .POProcessID) Then
               e.Values(2).DisplayValue = Me.ProcessBO1.ProcessName
            End If

It's MUCH faster ;-)

Let me know if you think there is a more efficient approach. Thanks!

StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
That's awesome! I got it to work. ;-) Here's my code:

         With DirectCast(e.BusinessObject, PurchaseOrdersBO)

            Using loBO As New LocationsBO
               loBO.FillByLocationID(.POLocationID)
               e.Values(3).DisplayValue = loBO.LocationName
            End Using

            Using loBo As New ProcessBO
               loBo.FillByProcessID(.POProcessID)
               e.Values(2).DisplayValue = loBo.ProcessName
            End Using

         End With

My only concern is that I am making a round trip to the database twice per row, which depending on the number of records returned seems to significantly impact performance. So I'm going to noodle with a way to make it faster.

I've thought about dropping copies of the Location and Process BO on the form and fill them on FormLoad... then I can just lookup the information based on a BO that has already been filled. Now I just need to figure out how to query filled BOs. :-)

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No problem Wink  Let me know if you get stuck.
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Thanks, I'm going to look it up right now.

Sometimes the hardest part is knowing WHERE to look. ;-) Thanks for taking the time to point me in the right direction.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes.  The BrowseDialog operates the exact same as a ListView in this fashion.  You will set the results field to be populated through an event instead of a formatted string.  Then in the RowPopulating event you will set the column to the desired value.  There is quite a bit of documentation regarding the BrowseDialog and the RowPopulating event.
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944




Based on the picture above is there any way that I can resolve the LocationID for LocationNames?



I love the fact that I can do it in the SearchFields but it would be really helpful to do it in the ResultsLayout also.



Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search