Search database to set value after selection

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mgqz
User
Posts: 89

Search database to set value after selection

Post by mgqz »

Hi, I have been able to set some values via the startup script based on some conditions (in JS,JQuery) but in this case I don´t know if that is the same approach.

this is what I need to 2:
After a user select a particular supplier (from a dropdown control in a form (edit or add)) I would like to suggest the value of another form based on the value entered in its last entry.

For example, If user selects expenses in Romano´s Pizzeria (A supplier) in my form, I would like to suggest that the type of expense is food or travel expense based that there is another record in the system for this supplier that was entered that way.. So I would after selecting do a query to the database see if there is a prior record for that supplier and get how was that classified.

So the question is where is this done in PHPM 11 or if you can point to an example or theme to look for in the help.

thanks


danielc
User
Posts: 1601

Post by danielc »

You may consider to use dynamic selection lists feature. See Field Setup in help file.

You may also look at the demo site, http://www.hkvstore.com/phpmaker/demo.asp. Table cars (field Trademark and Model) in edit page has setup dynamic selection lists.


mgqz
User
Posts: 89

Post by mgqz »

Hi, I understand how to do it with combo boxes based on other value, but how to just call a query based on some user selection for suggestion, is not mandatory that user will select.

Actually what i want is;
whenever I select for example a place I spend money (Restaurant XX1) I would suggest that the expense type is food, but can be another kind of expense, example drinks , so just based on selection, do a SQL to get what was the last record entered for that restaurant and suggest a value.

thanks


Post Reply