Filtering Records that a Browse Dialog Returns


Author
Message
Scott
Scott
StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)StrataFrame User (176 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Is there a way to have the browse dialog filter the records that it returns other then by what the user enters into the dialog itself? I guess what I am looking for is a way to add to the 'where' clause of the browse dialoge's business object.  We have two tables, table 1 is the main table and table 2 is a child table.  We want to allow the user to ONLY browse for records in the first table that have child records in table 2.

One last thing,  we are getting ready to release our first StrataFrame application.  It is VERY small and only for internal use, but it is a start.  We just have a couple of loose ends and have to figure out how to use the Database Deployment Kit.  Any idea when the docs will be done for it?

Just want to let you know all your hard work is paying off.... for everyone.  Thanks for StrataFrame and all the HELP!

Scott

StrataFrame Team
S
StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
At the moment, no, there is not a way filter the records within the browse dialog, but this has been a pending enhancement request, and since you're not the first or last person to ask for it (http://forum.strataframe.net/Topic463-6-1.aspx), we'll probably be adding it sometime soon (within the next week or so).



As for the Database Deployment Toolkit documentation... I'm not sure on the timeframe, but it's at the top of our list as well.
Danny Doobay
Danny Doobay
StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
Any udates on this?
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Danny.

Have a look at the help file under "Application Framework" -> "UI Layer" -> "Controls" -> "Browse Dialog" -> "Events", and check the "BeforeSearchExecuted" and the "Searching" events, where you can manipulate how the search will behave right before it happens.
Danny Doobay
Danny Doobay
StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
I followed the following sample and it did work for me.

Private Sub BrowseDialog1_Searching(ByVal sender As Object, ByVal e As BrowseDialogSearchingEventArgs) Handles BrowseDialog1.Searching        '-- Establish Locals        Dim where As WhereStatement        Dim myFruit As New System.Collections.ArrayList()        '-- Determine which values will be included as part of the "IN" tag        If _AllowApples Then myFruit.Add(CType(Fruit.Apples, Integer))        If _AllowOranges Then myFruit.Add(CType(Fruit.Oranges, Integer))        If _AllowPears Then myFruit.Add(CType(Fruit.Pears, Integer))        '-- Create the where statement.  In this example, we are going to have the test perform        '   an IN which will allow us to perform a query that includes all of the values in the myFruit        '   array.  my_Fruit is the field in the database.  So this where clause would look like this        '   in T-SQL  "SELECT ... WHERE my_Fruit IN (0,1,2) ..."        where = New WhereStatement(New String() {"my_Fruit"}, myFruit, WhereStatementTypeOptions.In)        '-- Add the where statement to the collection        e.RawWhereStatementsCollection.Add(where)End Sub

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Glad it worked! Cool
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