FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[RESOLVED] Do dropdown options from existing table store primary key?
#1
Okay, so have been playing with form tools for a couple hours and this is better than everything else out there I have tried!

One question I have, which I could not find in the documentation, has to do with using a dropdown to pick a value from another table.

So table 1 is called MyApps:
Code:
ID    app_name
1     Angry Birds
2     Where's My Water

And table 2 is called Ratings:
Code:
ID    app_id    rating
1     2            fun
2     1            great
3     1            terrible
So when setting up a dropdown for the app_id field in table 2, I can choose the ID field from table 1, which works fine.

The only problem is, that although I need to choose the ID from table 1 and store that under app_id in table 2, I do not want the drop down list to show me the ID numbers, but instead want it to show me the app_name field.

When editing the Dropdown Settings it allows me to choose the Form Field Contents (table 1 in my example) and then it allows me to Select Field (ID in this case) but I do not see how I can choose the value of one field while showing the text from another.

Thanks
Reply
#2
[RESOLVED]

When looking in the database, it seems that Form Tools is smart enough to store the the ID field of the MyApps table in the app_id field of the Ratings table, even when I choose the dropdown to display the app_name of MyApps table.

So Form Tools is storing the primary key from the other table, regardless of which field in that other table you choose to display in the dropdown.

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)