Newbie advice requested

bstanton

New Member
Hi Folks,
Can anyone advice on the best strategy?
I have 2 tables (facilities and devices) that I want to connect with a linking table for a n to n relationship (following the approach in the tutorial). I have created a linking table to which I have added 2 databasejoin elements, one joined to the PK element of one table and one to the other table. I can add records to this list, linking records from the other 2 tables using the 2 dropdowns. However, I would like to be able to see some of the other fields from those tables to assure that I have selected the corrected items from those tables (the names may not be unique). What is the best approach to achieve this?

kind regards
Brian
 
I think you should be able to use one of two methods ...

1) Use the "CONCAT" label, so you can build a more fully descriptive dropdown label, like ...

lastname, ', ', firstname, ' (', phone_num, ')'

2) use the Description Field in the advanced options of the element, which lets you display other fields from thed joined table under the dropdown selection, which changes automagically as you make selections from it.

-- hugh
 
Thanks Hugh!
I appreciate it. :)
I am able to get additional fields to display in my drop down when using Concat. However, one of the fields is "state" and it is showing the internal ID rather than the state name. Can you suggest how I might solve that?
Here's my syntax: sw_facility.facility_name, ', ', sw_facility.country_fk, ', ', sw_facility.state

I tried experimenting with the Description field (under advanced), but I must be doing something wrong because I can't see any effect from adding additional fields.

Perhaps there is a way to solve this using something like a cascading dropdown so that I can narrow down my dropdown list by country, then state, then choose the facility?

Kind regards,
Brian
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top