6 Replies Latest reply on Dec 9, 2016 1:21 AM by okramis

    Magic List value concatenation when using second column

    philparton

      Hi,

       

      As an FM newbie I have just worked my way through magic lists. The single column list is working fine but when doing a one using a second column I the list values are concatenating and its seems to be affected by the sort setting.

       

      I have a table Code with fields ID (numeric) and Name (text) with 4 records

      1, code 1

      2, code 2

      3, code 3

      4, code 4

       

      I created a two column magic value list using the following sql in the field OnObjectEnter trigger

      $$keys = select id from code

      $$names = select name from code

       

      If I select to see both fields and sort on the first field my popup menu displays:

       

      1 Code1Code2Code3Code4

      2 Code1Code2Code3Code4

      3 Code1Code2Code3Code4

      4 Code1Code2Code3Code4

       

      But it can store the selected ID correctly.

       

      If I select to see both fields and sort on the second field my popup menu displays:

       

      1234 Code1

      1234 Code2

      1234 Code3

      1234 Code4

       

      and when an option is selected I get the non-numeric value / revert field dialog.

       

      I am using the default delimiters in the ExecuteSQL call.

       

      Any ideas?

       

      Thanks

      Phil