StrataFrame Forum

BrowseDialog and List Controls

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

By fansanitis - 2/5/2008

I have a form that collects data on a doctor's patient evaluation.  The Evaluation table (and associated BO) only stores the primary key for the doctor in the Doctor table.  The user selects the doctor's name from a dropdown list (PopulationType = BusinessObject) that is populated from a business object mapped to the Doctor table.  I need to create a browse dialog for the Evaluations where one of the search fields is the doctor's name but the only data pertaining to the doctor in the Evaluations BO is the doctor's ID in the Doctors table. 

How can I make doctor name one of the searchable fields in this scenario?  I looked at PopulatedThroughEvent but I don't think that's the ticket. 

By Trent L. Taylor - 2/5/2008

You can create the same doctors combo to query by on a BrowseDialog as you did on your form.  You will choose the integer foreign key as the field.  When setting up the search field, you can use the PopulationDataSourceSettings under the combo tab.  If you can't get going I will post some screen shots.
By fansanitis - 2/5/2008

Screenshots would be great if you don't mind.   Thanks!!
By Trent L. Taylor - 2/5/2008

Just navigate to the Combo - Business Object tab.  From that point forward it works like a list or combo box.  The only difference is that if you need to supply a parameter for the query, you will handle it in the ComboListPopulating event of the BrowseDialog:

By fansanitis - 2/6/2008

Thanks Trent, that works but it brings up some more questions. 

1. Can the text portion of the combobox be made "editable"?  The way it stands now, it appears you can only search on a specific list item (Equals) and leaves the rest of the advanced options irrelevant if the list item values are physicians names.  Is there any way of joining the "searchable" BO to a textbox instead of a combobox where entered text could be used to do partial name searches instead of exact matches?

2. One of my search fields is a datetime field.  Is there anyway to force the format of the date display in the text portion of the datetimepicker control (e.g. "02/06/2008" instead of " 2/ 6/2008")?

3. The date search field I have setup is a datetime field in the database.  When the data is added/updated, only the date is supplied so the db value is always "mm/dd/yy 12:00:00AM".  When a search is done with a date field by using the "generated" datetimepicker control, is the time also being used?  I can't get any "hits" using the "Equals" option for a specific date.  I have to use "Less Than" or "Less Than Or Equal To" but then I get unwanted rows return.  Is there anyway to search just for a specific date reguardless of time?

Thanks!!

By Trent L. Taylor - 2/6/2008

Can the text portion of the combobox be made "editable"?  The way it stands now, it appears you can only search on a specific list item (Equals) and leaves the rest of the advanced options irrelevant if the list item values are physicians names.  Is there any way of joining the "searchable" BO to a textbox instead of a combobox where entered text could be used to do partial name searches instead of exact matches?

At present, no.  You are basically wanting to search a different table than the browsedialog represents.  In our medical software, we simply populate this combo with the doctors and they can choose which doctor (which uses the normalized foreign key field).  To be able to search on the last name of the doctor, that field would have to exist in the table in which you are searching. 

One of my search fields is a datetime field.  Is there anyway to force the format of the date display in the text portion of the datetimepicker control (e.g. "02/06/2008" instead of " 2/ 6/2008")?

This is controlled by the machine settings.  You can change this on the computer's Regional and Language settings....this is not hardcoded as different countries use different date/time formats.  Open up the control panel in Windows and go to Regional and Language Options.

The date search field I have setup is a datetime field in the database.  When the data is added/updated, only the date is supplied so the db value is always "mm/dd/yy 12:00:00AM".  When a search is done with a date field by using the "generated" datetimepicker control, is the time also being used?  I can't get any "hits" using the "Equals" option for a specific date.  I have to use "Less Than" or "Less Than Or Equal To" but then I get unwanted rows return.  Is there anyway to search just for a specific date reguardless of time?

Scroll further over in the options when setting up a date/time field:

By fansanitis - 2/6/2008

Thanks for the direction!!  As for the Date tab on the Search Field Criteria page, I'm not seeing it.

By Trent L. Taylor - 2/6/2008

Download the beta of 1.6.5 from the posted releases section of the forum: http://forum.strataframe.net/FindPost13756.aspx .  There have been a significant number of enhancements made to the BrowseDialog, this is one of them.
By fansanitis - 2/7/2008

Installed the 1.6.5 beta and I was able to set the date search not to use time.  Thanks Trent!!
By Trent L. Taylor - 2/7/2008

Good to hear....yeah there have been a number of users (including ourselves) that had run into this issue.  This also allows you to have the same date field included more than once and then to a less than ad greater than query to get results between dates.  Glad you got it going Smile