dynamically Updating DB Popup values in a form for selection

For HanDBase related topics that are not specific to one platform.

dynamically Updating DB Popup values in a form for selection

Postby alexhatz » Mon May 28, 2012 4:02 pm

Hi,

I want to create a form that filters the values I can select based on the input of the field before it.

For example.

In the first field called Food, I do a DB Popup on a DB called Food, where that DB is populated by different types of foods: Fruits, Vegetables, Meat.

Once I pick a type of food, i.e. "Fruits", in the next field of the form I want the pop up to only show Fruit types i.e. Apples, Oranges, Watermelon.

How do I do this?

I have a DB, that has a Food field, and Type field. But I can't figure out how to make the Form work.

Food Type
Meat Chicken
Meat Beef
Fruit Banana
Fruit Orange
Veg Cucumber
Veg Pepper
alexhatz
 
Posts: 7
Joined: Mon May 28, 2012 3:51 pm

Re: dynamically Updating DB Popup values in a form for selec

Postby dhaupert » Tue May 29, 2012 2:41 pm

Hi there,

Unfortunately there is not an option to filter a DB Popup list based on the value of another field. I have often wished for such a feature, but it's not there currently. What you can do if you're working with a limited set of subcategories is create different forms that look similar to address this in a pseudo fashion. It's complicated but doable. It involves having separate databases/tables for each type of food. For example, a Meats database, a Vegetables database, etc. For example:

Select the type of food: [ Popup to food types ]

[ Next]

Now the [ Next ] button would normall jump to the next question, but in this case we actually have several [Next ] buttons with their visible state being dependent on the value of the food type field. So there is one Next button which will jump to the 'select vegetable' form. It's only going to be shown depending on the value of a conditional field you add (and hide from view). The formula would be if food type is Vegetable output is 1, else output is 0. The setting for the button's visible attribute would be depending on the value of that conditional field. Likewise, another button jumping to a Meat form based on the value of a conditional for meat.

When next is pressed the appropriate form would come up. On that form you would show the DB Popup that is related to the database of the type. So the Veggies form would show the db popup for the type of vegetable.

Now you have several conditional fields added, several forms added, and several buttons added that are dependent on the type selected. How do you then get the value into a single field? With some more conditional fields. Here's how they would be set up, assuming the DB Popups for each food type were named:
VegetableDBPop, MeatDBPop, FruitDBPop, etc.

Conditional named sub1. If VegetableDBPop is not equal to "" (ie, blank), output is VegetableDBPop, else output is MeatDBPop.
Conditional. If FruitDBPop is not equal to "", output is FruitDBPop, else output is sub1.
.. etc.

The final of these conditionals will contain the value selected in the appropriate db popup and can be used for displaying, exporting, etc.

I know this is a convoluted process, but just trying to offer you a solution based on the current capabilities. Hopefully some time in the future we can address the specific need you have as it's a useful one!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: dynamically Updating DB Popup values in a form for selec

Postby alexhatz » Tue May 29, 2012 8:18 pm

I'm trying to wrap my head around this but it is not working.
The example I gave with Fruits and Veg was a simplification of what I'm really trying to do.
Is there anyway I can pay you to build my database for me.
I'm serious. This will take me days to figure out, if ever.
alexhatz
 
Posts: 7
Joined: Mon May 28, 2012 3:51 pm

Re: dynamically Updating DB Popup values in a form for selec

Postby dhaupert » Wed May 30, 2012 1:31 pm

Hi Alex,

I'd be happy to assist. Feel free to email me with details and any examples of databases you've set up.
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: dynamically Updating DB Popup values in a form for selec

Postby alexhatz » Wed May 30, 2012 3:19 pm

I sent you an email with more info.
Thanks.
Alex
alexhatz
 
Posts: 7
Joined: Mon May 28, 2012 3:51 pm

Re: dynamically Updating DB Popup values in a form for selec

Postby JohnDeere2Cylinder » Wed May 30, 2012 9:12 pm

I too wish for this feature. I have spent more than a week trying to build a work around. A dbpopup based a value in a previous input field of the same database. Thanks
JohnDeere2Cylinder
 
Posts: 14
Joined: Tue May 15, 2012 7:30 am

Re: dynamically Updating DB Popup values in a form for selec

Postby jcschell » Wed Dec 19, 2012 3:37 pm

JohnDeere2Cylinder wrote:I too wish for this feature. I have spent more than a week trying to build a work around. A dbpopup based a value in a previous input field of the same database. Thanks


And, another vote for this feature

Jim
jcschell
 
Posts: 1
Joined: Wed Dec 19, 2012 3:31 pm

Re: dynamically Updating DB Popup values in a form for selec

Postby ksutton » Thu Jan 31, 2013 12:16 pm

another vote for this feature.
ksutton
 
Posts: 2
Joined: Thu Jan 31, 2013 12:07 pm

Re: dynamically Updating DB Popup values in a form for selec

Postby hemat » Thu Jun 20, 2013 3:57 am

I add my vote for this feature too
hemat
 
Posts: 1
Joined: Wed Jun 19, 2013 5:53 am

Re: dynamically Updating DB Popup values in a form for selec

Postby dritchie » Mon Jul 01, 2013 6:29 am

I am another fan of this feature request. Could use it right now. Not sure how I can make a work-around without it.
dritchie
 
Posts: 2
Joined: Mon Jul 01, 2013 6:26 am

Next

Return to HanDBase General Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron