Using the WhereStatement


Author
Message
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
Good job...glad you got it going! Smile
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
The search item is invisible, so I removed the checkmark on "Ignore initial search value if not visible" and it works. Cool. Smooooth



Thanks!!
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
No worries on the absence...you need no excuse. We are all glad to have you back.



I am trying to work out the OverrideSearchTableName and OverrideSearchTableSchema properties on one of my Browse Dialogs. The browse dialog is being stubborn. The OverrideSearchTableName has been set to my newly formed SQL view. The OverrideSearchTableSchema has been set to dbo. All seems well.



The field (divindex) I added to the View is not showing up in my list of SearchFields. Shouldn't it? If I manually enter the field, there is no comforting checkmark icon on the left in the SearchFields dialog like all of the other kids. When I run it, there is no change. It is as if the new view doesn't want to play with the dialog. Not sure who is being stubborn, actually. Probably, me.



Can you shed some additional light on this?



Thanks!!
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
Sorry for the absence! Had a lot going on lately. The good news is that we are really building a strong internal SF team that will eventually be all hands on deck both in development and forum activity...so the absence has been for a greater long-term purpose!
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Cool! Thanks for the tip.



Good to see you back on the boards!! BigGrin
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
Why not use the OverrideSearchTableName and OverrideSearchTableSchema? You can use a view here which would then allow you to get creative on your query within the view and create any type of result set or output you need. If this doesn't work, then you can also use the Searching event. Between these two methods, I have done some very creative stuff and never had the need to do anything outside of it. Also, keep in mind that you can also dynamically change the OverrideSearchTableName at run-time and use multiple queries if that would help also. If you search the forum for the Override properties mentioned, I know that we had a sample out there somewhere and a long discussion to go with it.
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Bill Cunnien (11/06/2009)
Is it possible to substitute a SQL Stored Procedure for the logic of the Browse Dialog?




Just bumping...still looking for some help on this.



Thanks,

Bill
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Is it possible to substitute a SQL Stored Procedure for the logic of the Browse Dialog? If so, then my problems are solved.



What I am trying to do involves the Browse Dialog and the use of the WhereStatement.



WhereStatement mWhere = new WhereStatement(new String[] { "partindex" }, mPartArray, WhereStatementTypeOptions.In);

e.RawWhereStatementsCollection.Add(mWhere);




If there is another way to do this (limit the work orders BO by the divisionindex of the Part assigned to the work order), I'd really appreciate some suggestions. I can do all of it in a query on the server--no problem (and, it is indeed fast that way!). What I need, for now, is the proper way to do it within the Browse Dialog.



Thanks!!

Bill
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Also, Bill, if you are using SQL 2008 you might take a look at the sample stuff I posted in User Contributed ... regarding passing a datatable as a parameter to a SQL sproc for doing exactly this kind of stuff. Pretty powerful and seems tailor made ( as opposed to Taylor made BigGrin ) for this kind of thing.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Bill,



I'm not quite clear on what your doing with the code, but perhaps if you rethought how to do this on the server, it'd go faster. I rarely use an IN clause discreet values if there are going to be lots of values. Rather I'd use a join or a sub query. I.e. rather than a statement like this (the resulting SQL statement):



Where partindex IN(1,2,4,5,....,(1250 of these)...)




to something like:



Where partindex IN(Select partindex From PartMaster Where divsionindex = @divID)




Assuming you've got an index on the divisionindex, this should be blazing fast on SQL side, and since no array is being created, blazing fast in code to.
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