Database join with where clause

Mono

Member
I have 3 tables

Make, contains Names of makes
Model, contains models relevant to Makes
Vehicle, contains id from Make and Model

When creating a new record in the table 'Vehicle' it is possible using a database join to select Make (works great)
Then Model is ajax updated to only show models relevant to make (works great)

When I return to edit the 'Vehicle' record, the 'Make' DBJoin is populated but the 'Model' DBJoin is 'Please Select'.

If I change 'Apply Where When' in model DBJoin to NEW only, then the correct record is displayed but the dropdown is populated with every model for every make, as you would expect with no Where clause.

Is there a way to use where clause when editing?
 
Last edited:
Hi thanks

Yes I'm using ID

This is my where

Code:
{thistable}.fk_makes = '{tbl_vehicles___dbj_manufacturera}'

eval default is set to no
ajax update is set to yes
add option in front end is set to yes.
enhanced dropdown is set to yes
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top