You can make value lists where values are displayed from a field in a related table. But you can't do that with ExecuteSQL. If you're using ExecuteSQL, can you give us the SELECT statement you are using?
$$KEYS = SELECT ID FROM Code
$$Names = SELECT Name FROM Code
Yes that is the sql I am using and I can see global variables are been set as expected...
It looks expected behavior if the keys / values are in a record.
Are you sure that "magic lists" works for 2 fields value list?
I don't know, I was using this article as a reference, which implements a two column list..
I presumed the ExecuteSQL would put the records into the global variables delimited by carriage returns so the popup menu would interpret each as a separate record, but I am an FM newbie...
There are two outstanding articles in the german Filemaker Magazin 201301 and 201302 by Arnold Kegebein, the second one on displaying one column but saving the other. Might not be of help because they're in german....