Use BrowseDialog to fill some fields


Author
Message
Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Hi

I'm using BrowseDialog in may forms in my application, of course the BrowseDialog is always used to find an specific record.

I have the idea of use BrowseDialog just to fill some fields in my form, not to recover a record.

I will try to describe the idea:

I have a form to contacts, is a normal maintenance form, it has a BrowseDialog for find contacts. Part of the information of contacts is State - City - Locality - Postal Code. Some we have a field for each value, I use combos to select the state, based on selected other combo is filled with the city in locality I can use another combo too. But as the Postal Codes table has the information of locality, city and state, I think users can select a postal code and the fields of locality, city and state can be filled.

The idea is use a BrowseDialog where users can search by postal code, state, or any other of the fields there, once the found the desired record, when go back to the form this will fill the text boxes according to their selection. Is this possible with BrowseDialog?

Waiting for your valuable comments.

Regards.

Smile Everything is possible, just keep trying...

Replies
Guillermo Vilas
Guillermo Vilas
StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 2.3K
Hello Juan Carlos

It is possible, although I'm not sure the best approach.



The way I'm implementing this is:

1. Create a table that will contain zip codes, state, county information.

2. Create a BO to map that table: ZipCodesBO

3. Add the BO to the Customer Form (CustomerBO and ZipCodeBO)

4. Drop a BrowseDialog to the form and setup to fill de ZipCodeBO with the results

5. You may want to add a custom button to handle the ZipCodeBrowseDialog call or add the call method in a text validated event so after the user types a zip code the ZipCodeBrowseDialog will show but I'm not sure if you can pass the text entered as initial SearchField.

6. The if you have a TextBox to populate with the results it will need to map to the ZipCodeBO not the CustomerBO.



Hope it helps


------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT

MacBook Pro i5 OSX Lion
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Juan Carlos, Guillermo,

As far as I know the Dialog Browser will always display the records found in the search so the user can select the one they want to show in the form.  With this in mind, Juan Carlos, unless you want your end user to be always presented with the Dialog Browser to choose the data, then that may work.

On the other hand, your requirement is pretty simple, you just need a function, probably a Shared one which will return the City/State values when passed the zipcode value.  There are many variations of this one, also there are a couple of free Web Services which will accept the zip code value as a parameter and return you an XML file with the City/State values.

I believe that using the Dialog Browser for this would be overkill for the application and mostly the end user.

Edhy Rijo

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