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
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
Edhy Rijo
E
Edhy Rijo
posted 16 Years Ago
ANSWER
HOT
Topic Details
Share Topic
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Hi all,
Is it possible to specified or exclude the fields to be included in a BrowseDialog?
Since a Browse Dialog is assigned to a BO I believe that it will bring all fields in the BO, how to exclude a couple of fields in the SELECT statement so only the ones needed are used in the SELECT Field1, Field2, Field3, etc.?
Edhy Rijo
Reply
Like
0
Replies
Trent Taylor
Trent Taylor
posted 16 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
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 16 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
Threaded View
Threaded View
How to exclude fields in a BrowseDialog search
Edhy Rijo
-
16 Years Ago
Forgot to mention that I know I can create a view for this but is...
Edhy Rijo
-
16 Years Ago
Edhy -
Hello.
So, you can control the fields...
Alex Luyando
-
16 Years Ago
[quote][b]Alex Luyando (03/11/2010)[/b][hr]...When the BO that is to...
Edhy Rijo
-
16 Years Ago
Aren't there some events you can use to manipulate the SQL being sent?...
Greg McGuffey
-
16 Years Ago
[quote][b]Greg McGuffey (03/11/2010)[/b][hr]Aren't there some events...
Edhy Rijo
-
16 Years Ago
I'm not seeing anything either Edhy that would allow the fields...
Greg McGuffey
-
16 Years Ago
Thanks Greg for the confirmation.
I am going with the View...
Edhy Rijo
-
16 Years Ago
Ok here my conclusion, a view should be used and in this case of...
Edhy Rijo
-
16 Years Ago
( I'm posting this without thinking it through completely so bear with...
Charles R Hankey
-
16 Years Ago
Hi Charles,
Yes you are right, but in the BD I don't see...
Edhy Rijo
-
16 Years Ago
Actually, one of the very cool things about BOs is that you can fill a...
Greg McGuffey
-
16 Years Ago
[quote][b]Greg McGuffey (03/11/2010)[/b][hr]The issue Edhy was having...
Edhy Rijo
-
16 Years Ago
okay, again I may not be thinking this throug, but my idea is to use...
Charles R Hankey
-
16 Years Ago
Where's Override Schema? Is this an event or property or method?
Greg McGuffey
-
16 Years Ago
OverrideSearchTableName
OverrideSearchTableSchema
...
Charles R Hankey
-
16 Years Ago
Here's the source that uses it in BrowseDialogWindow
...
Charles R Hankey
-
16 Years Ago
okay, on searching further here on the forum I get it - the "schema"...
Charles R Hankey
-
16 Years Ago
Yes Charles, this refers to the database Schema not the fields, but I...
Edhy Rijo
-
16 Years Ago
[center][b]!!!Warning!!!![/b][/center]
For anybody using...
Edhy Rijo
-
16 Years Ago
Seems like an analogous method to the OverrideSearchTableName/Schema...
Greg McGuffey
-
16 Years Ago
The Public Function Search() in the browsedialogwindow uses the bo...
Charles R Hankey
-
16 Years Ago
OK....let me jump in here. First, there is already a way to do both....
Trent L. Taylor
-
16 Years Ago
Hi Trent,
Thanks for the explanation and for the new event...
Edhy Rijo
-
16 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search