Get data from another table using dropdown as reference

Farcell

Member
Hi there, I was having difficulty getting data from one table to another using a databasejoin field as a reference. I tried creating another databasejoin filed and setting the WHERE setting to reference the other databasejoin but had no luck.
 
That should work.

What are your element names, and what is the WHERE code you are using. And do you have "AJAX update" set to Yes.

One possibility is that you need to use the _raw suffix for the other element name ...

WHERE {thistable}.id = '{yourtable___otherjoin_raw}'

... or whatever.

We'll need to know more details about what you are trying to achieve to really help, though.

-- hugh
 
Ok, I tried the method above and the form does not update the record. I am using three fields from another table (cargo, shipping date and arrival date) as databasejoin. When an option from the cargo dropdown is selected the other two fields (shipping date and arrival date) should also be updated with the relevant record from the cargo table.

Thanks
 

Attachments

  • Customer Form.png
    Customer Form.png
    39.4 KB · Views: 89
Hi there, please ignore my last post. Got it to work. Mixed up the order of which table should be referenced first in the WHERE and disabled please select. Although the date format has the time stamp which is annoying.

Thanks hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top