Browse dialog leaves a filter on my BO


Author
Message
thegwill
thegwill
StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)
Group: Forum Members
Posts: 16, Visits: 177
I have a data maintenance form and I'm using the Browse dialog to offer a search.

I have a problem with the state that the Browse functionality leaves the maintenance form in after a browse is performed and the user selects one of the results. After closing the browse dialog I cannot navigate the full recordset that was previously populated in the business object bound to the Browse. Instead, only the search results that matched the user's search in the Browse dialog are available.

Is this by design? - if so, how do I clear the "filter" - should I Fill the data?

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Thegwill.

I think the Browse Dialog will search your table, and not your current recordset. What if the user chooses a record that wasn't in you recordset in the first place? Unless, of course, you are loading all records into your BO on form load.

If the user wants to have the whole recordset back, he/she could go back to Browse and do a search with no criteria. That would fill the BO with all records from the table.

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
Is this by design? - if so, how do I clear the "filter" - should I Fill the data?

Yes.  The BrowseDialog will always search the data stores records and not the records within your BO.  The business object that you associate with the browse dialog on the form (BusinessObjectToPopulate) will have all of the interal records replaced with the results from the browse.  If you want to combine a BO on your form with the results that come back from the sever, then just drop another BO on your form which will be used for browse purposes only and leave the other BO which is bound to your controls alone.  Then once the browse has been performed, you can merge the two BOs by calling the CopyDataFrom method on the bound BO.

MyBoundBO.CopyDataFrom(MyBrowseBO, ClearAndFillFromTable)

If you want to search within a BO, then you can just perform a Select() on the DataTable itself:

MyBoundBO.CurrentDataTable.Select("WHERE STATEMENT")

Also, if you have an actual "Filter" applied, then just reset the property:

MyBO.FIlter = ""

Note: The BrowseDialog does NOT apply a filter, it pulls actual records back from the server.

thegwill
thegwill
StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)
Group: Forum Members
Posts: 16, Visits: 177
Thanks for the suggestions. I'll give them a try
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