AnsweredAssumed Answered

Aliasing an ID to a name in relational tables?

Question asked by kyzaadrao on Apr 3, 2009
Latest reply on Apr 3, 2009 by philmodjunk


Aliasing an ID to a name in relational tables?




Hit a stumbling block when trying to make filemaker display the "name" of a record for human consumption, when it uses the ID field under the hood. Here's my scenario.....


I have an accounts table with an accountTypeID field. I have an AccountTypes table with it's own ID.

I want to show the "names" of the account types from the account types table in a dropdown in the Accounts table field under AccountTypeID, but the relationship is via ID's between the two tables.


Got it partially working by making a value list that uses the AccountTypes ID and AccountTypes Name and looks like this in the value lists window...

use values from field: "AccountTypes::AccountID" and "AccountTypes::Name"


The above is set to "include all values" and "show only values from second field"


Then I plug this list into my dropdown field in my layout for editing the AccountType ID of the Accounts works fine in part ... it shows the account type names in the dropdown, but it still shows the ID number for account type after it's while my user will see the account type names in the dropdown, they still only see the ID number when flipping through records.


So I guess my question is how can I completely "alias" the AccountType ID to display as the AccountType Name to the user, or is this even possible?

I use ID's throughout my tables and of course like users to choose by name, so it's a step forward for me in smooth user experience.

Hope that wasn't too confusing.