StrataFrame Forum

BrowseDialog

http://forum.strataframe.net/Topic5167.aspx

By Larry Caylor - 12/9/2006

I’m using a combobox in a browse dialog that is populated by a Enum and setting the initial search value to the Enum I want to search on.  When I run the program the initial value for the combo box along with other search criteria that I’ve defined is displayed. What I’d like to to do is prevent the user from changing the initial value I specified for the combo box and limit their selection to the other search criteria. I tried un-checking the Visible property on the Search Field Criteria window figuring this is what it is intended for. However when Visible is un-checked the Initial Search Value is not set and I end up with a conversion for type ‘DBNull’ to type ‘Integer’ exception since I have no matching Enum for the value zero. To me it would make the browse dialog more useful if it set the search field to the initial search value specified when the field is not visible to the user.

-Larry

By Larry Caylor - 12/15/2006

Did you guys miss this one???
By Trent L. Taylor - 12/15/2006

It has been reqested several times that the search will include "non-visible" fields with search values.  At present this functionality does not exist.  It is on our enhancement lists, but as to when this feature (if ever) may make it into the framework I do not know.
By Larry Caylor - 12/16/2006

Thanks for the explanation. You can add me to the listSatisfied

By Paul Chase - 12/29/2006

Me 2Tongue
By Greg McGuffey - 1/3/2007

Me too BigGrin



Actually, I'd like to suggest rather than a hidden field (or in addition to), how about a property that can just be set to some arbitrary filter. This could either be set in the property sheet or via code and would be a base filter that the user would not have any control over. I would suggest that it even be parameterless (I.e. the filter is built as it is needed by the DB), since only the developer would set the value. Take this value, wrap it in parentheses and 'AND' it to the user provided filter (if the user provided a filter, of course).



E.g.

Property called something like StaticFilter.



In code you'd set it to something like:



BrowserForm1.StaticFilter = "Country='us'"



or



BrowserForm1.StaticFilter = "CountryCode=1"



The resulting where clause would look like (of course, parameters would likely actually be used for the user entered parameters):



Where (Country='us') And (lastname='jones%')



where the user entered 'jones' for the lastname filter.



I'm currently implementing my own version of the BrowseForm, because I MUST have this feature. I have row level security, and while I can enforce that easily via appropriate FillBy methods of a BO, I need to also enforce that when the user searches (they effectively can only search the rows they have access too). If there is something terribly wrong with this idea, please let me know, as I'll be using it soon Crazy



Thanks and I hope you all had a good break!
By Trent L. Taylor - 1/3/2007

Okay...Okay...I give... I will see what I can do BigGrin
By Greg McGuffey - 1/3/2007

Thanks! w00t