StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
How to exclude fields in a BrowseDialog search
How to exclude fields in a BrowseDialog search
Post Reply
Like
0
Prev
1
2
3
Jump To Page
How to exclude fields in a BrowseDialog search
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Greg McGuffey
Greg McGuffey
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 2K,
Visits: 6.6K
Seems like an analogous method to the OverrideSearchTableName/Schema would be nice here, something like OverrideSearchSelectFields.
Reply
Like
0
Charles R Hankey
Charles R Hankey
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 524,
Visits: 30K
The Public Function Search() in the browsedialogwindow uses the bo allfieldslist
'-- Changed TLT - 8/25/2009 to allow a view to be used and include all fields in the results list
If Not _BrowseDialog.IgnoreTableMappingAndIncludeAllFieldsInResults Then
loInfo.Fields.AddRange(Me._BusinessObject.AllFieldsList.ToArray())
Else
loInfo.Fields.Clear()
End If
'-- End of change
So it would seem if that list were exposed in the BO properties on the instance level that would pretty much take care of it and be useful in other areas as well. Present all the fields in a picker - either uncheck to exclude or check the fields to exclude, that sort of thing.
Alternately, a property that is a list of fields that if it is not blank would be used instead of allfieldslist.
Reply
Like
0
Trent Taylor
Trent Taylor
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
OK....let me jump in here. First, there is already a way to do both. The BrowseDialog uses a QueryInfo class that gets passed all the way down to the DAL which in a query class written specifically for this class that is independent of any database on the back end. This is handled in the DbDataSourceItem which interprets the contents of the QueryInfo class and then properly builds the query necessary for the results. I have just made a change that will appear in the next update that fully exposes this property immediately before executing the query. It will be called BeforeSearchExecuted and it will give you the full QueryInfo instance that is to be used immediately before it is actually used. This is easier than using the Tokens that allows you to inject logic into the QueryInfo class through the Searching event.
When you get this update and if you elect to manipulate the QueryInfo class, you will just clear out the Fields collection on the QueryInfo and add in the fields that you want to be returned.
Now that this particular argument has been resolved....here is my opinion. You are better off creating a view anyway. It will be easier and was the reason it was introduced in the first place. Let's quickly discuss why the view or alternate table option was added. We had introduced the tokens within the Searching event that manipulated the QueryInfo class. However, there were still some issues that could not be fully realized until the underlying query was accessible. This was a need that came from our medical software. We had this very need, and we were also in control of the framework and knew that we could expose this QueryInfo class and manipulate it as well. Obviously we determined that the cleanest, fastest, and most scalable option was to create a view that could be injected as the query source which ultimately opens up the world in regards to result sets coming back in a browse dialog.
At any rate, you can do it either way...but I still would go the view route in this case.
Reply
Like
0
Edhy Rijo
E
Edhy Rijo
posted 14 Years Ago
ANSWER
Post Details
Share Post
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Hi Trent,
Thanks for the explanation and for the new event to handle this kind of situation even though I agree with you that at the end, a view will serve much better and will be more flexible to work with.
Edhy Rijo
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
0
Prev
1
2
3
Jump To Page
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search