This topic is locked

Adding new records with a Lookup field

5/13/2008 2:20:26 AM
PHPRunner General questions
P
patc888 author

I have a table that has an id into a lookup table.

I've figure out how to display the value from the lookup table rather than the id.
Is it possible to insert new records using the lookup value rather than the id?
E.g. table A has color_id

table B has color_id -> color_name
Is it possible to create a view such that when I insert new records into

table A, I can pick from a drop-down with all the color names?
Thanks for any help.

R
rockrockers23 5/13/2008

try this ...

GO TO YOUR TABLE A

when you are already in the LOOkUp table,

1 select the NAME OF YOUR TABLE B.

2. in the LINKFIELD, select the ID as your KEY to link Table B.. just the id not THE NAME.

3. then in the DISPLAY FIELD, select the NAME, NOT THE ID..

then clik the button TEST.

P
patc888 author 5/13/2008

Yes, that did it.

I was confused by one of the tutorials which showed that I should join with the lookup table.

The tutorial appears to be wrong (or maybe it's showing something else).
There's no need to join with the lookup table.

Just Right-click on the A.ID and then in the "Edit As" panel, choose the lookup table.
Works like a charm now <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=29199&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
Thanks!

R
rockrockers23 5/14/2008

okies... NP