I'm not sure what you mean exactly, but if you look into the sample file I've sent you yesterday, you see that the popups with colour and shape name are actually setting the ID from the respective parent table, rather than the name. So every new object (colored shape) in the „Factory“ has the correct IDs for both shape and colour.
Your seeing the name in the popup is simply a lookup mechanism FileMaker provides for values lists (the second field in the Value List definition).
Now at another place (layout) you could decide to display a list of all objects; choosing one would give you access to its unique ID, as well as its foreign keys for shape and colour.
Maybe post a file with what you already have in place, and also, describe a bit more what the final purpose of this is.
It sounds like you want to set a global field to act as a selector. This is pretty simple.
* Create a field in your table and give it 'global storage'; call is something like "select_serial"
* Create a table occurence of your table, and link it to the original table via: Table1::Select_serial => Table2::SerialID
* Create a layout based on Table1 that shows the field Table1::Serial, formatted as a pop-up list. You can create a custom value list to use in the pop-up, or better yet, base the value-list on the Table1::Serial field directly. Then it will only show you values that are in already in the table, and it will also automatically update when new values are added.
* On the same layout as above, show these two fields: Table2::Color and Table2::Shape
Now, whenever you pick a valid value in the pop-up field, it should populate the other two fields with the matching data. You can do a similar thing in the reverse, to generate a serial number from the Color and Shape fields: create two global selector fields, create a table occurrence that uses BOTH Color and Shape in the relationship, create a pair of value lists, create a layout with the Color and Shape fields as pop-ups and showing the resulting Serial field from the new table occurrence.
There are probably a number of other ways to do this.