Copying foreign keys
2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 15, 2010 (RSS)
By ispro - January 14, 2010
Apologies if this has been covered elsewhere: I have a simple foreign key problem:
I have a database table "A" with fields member_number, member_name. I want to store member_number in table "B" so that I can later do a join on member_number. The editor for table "B" needs to do a lookup on table "A" and display the member_number and related member_name to the user, but store only the member_number. How do I do this?
I have a database table "A" with fields member_number, member_name. I want to store member_number in table "B" so that I can later do a join on member_number. The editor for table "B" needs to do a lookup on table "A" and display the member_number and related member_name to the user, but store only the member_number. How do I do this?
Re: [ispro] Copying foreign keys
By Dave - January 15, 2010
Hi ispro,
Under "Section Editors" select "Table B" and add a "list field" with these options:
List Options: Get options from database (Advanced)
Section Tablename: Table A
Use this field for option values: member_number
Use this field for option labels: member_name
Hope that helps, let me know if that works for you.
Under "Section Editors" select "Table B" and add a "list field" with these options:
List Options: Get options from database (Advanced)
Section Tablename: Table A
Use this field for option values: member_number
Use this field for option labels: member_name
Hope that helps, let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com