Topic: Trigger action on combobox
Hi everyone,
I have a serious issue trying to figure out how to set a trigger like action within MVDB.
To simplify it, let's say I have 3 tables with 3 column each, except Status
Users | Phone | Status
------------------------------------ -------------------------------------- ------------------
id | Name | id_Phone | id | Number | id_status | id | Status
------------------------------------- ---------------------------------------- ------------------
1 | Name1 | 1 | 1 | 1234567 | 2 | 1 | Not used
2 | Name2 | 4 | 2 | 9876543 | 1 | 2 | Used
| 3 | 7854129 | 1
| 4 | 1745823 | 2
Using a simple form, I want to display the following information on the action show record:
Name in a textbox | Number in a combobox | Status in a textbox
When the record shows, I want to display current SQLValue.
When I click on the combobox to change the number, I want to display in the list only the number with id_status<>2
Here comes the tricky part:
I do not change anything, I want to see current Number back.
If I change the number, I want the old number to get id_status = 1 and the newly chosen one to get id_status = 2
So far I could manage to display a filtered list of available number when opening the combobox but if do not chose a number, the combo becomes blank. If I choose a number, I have to update 2 status manually.
I am really open to any suggestion, idea, trick, tips....
Attached a quick and dirty example with no dll or exe.