BrowseDialog Question


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
How would I set a static search criterion for a Browse dialog? I.e. I need to always limit the records returned by "project" (yes the infamous project), which is determined at run time. E.g. I have a process form (storing info about processes) that needs to always limit the search to the current project plus whatever criterion the user provides (if any).



Can I enter runtime determined values in the initial value, like a .net variable?



Is the criterion used to filter the BO or fill the table? If it used to filter, then I suppose the FillBy method that I'm using would do the trick.



Thanks!
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I need to always limit the records returned by "project" (yes the infamous project), which is determined at run time.

Set the BrowseDialogs MaximumReturnedRecords property...by default it is 1000. 

Can I enter runtime determined values in the initial value, like a .net variable?

me.MyBrowseDialog.SearchFields.Item("MyField").InitialValue = "Whatever"

Is the criterion used to filter the BO or fill the table?

Fill...a filter would not be feasible if there were a lot of records.  We dynamically create queries to pull data back from the server. 

Just FYI...there is a ton of documentation on this control.  It was just updated before this last release also.

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
OK, so to set an immutable search criterion would be configured to search on a field, set to be not visible, and then set the initialvalue in code when the form loads, right?
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
At the moment the search field does have to be visible...but you can hide the entire search fields panel.  If you look at the FormLayout property, you can hide the side and bottom panels.  If you put the SearchFields in the bottom panel, and the Results in the top panel...you can totally control the search and have it return whatever data you want...and the end-user cannot control the search criteria.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Bummer.



I need to have one criterion that is set by program, then allow others to be set by user. So, I need to be able to hide just one search field. Oh well, I was hoping that the BrowseDialog would be an easy way to add some searching, but that is not the case in most of the situations I'll be using it.
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well....just so you know, this has been on the enhancement requests for a while.  This is not the first request for this type of behavior.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Any way to subclass this puppy and add some functionality, while still leveraging the query string builder, etc.?
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, you can subclass a BrowseDialog so that you can reuse it over and over again...but the code that you would need to get to is buried within the class...and is really not something that you would want to change. 
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Okey dokey...I guess I'll have to roll my own.
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