1 Reply Latest reply on Oct 31, 2012 6:57 AM by philmodjunk

    Dynamic value list should have 5 values but keeps growing after each record?

    GabeDiaz

      Title

      Dynamic value list should have 5 values but keeps growing after each record?

      Post

           Hello, I am using FMP12 and I have a very simple script which you can see in the screenshot below. It does the following:

           1. Clears the value_list_pdu_1A1A field.
           2. Sets the variable $VALUE to the contents of field PDU 1A1A from the previous record.
           3. Sets the value_list_pdu_1A1A field to $VALUE-2 $VALUE-1 $VALUE-1 $VALUE+1 $VALUE+2 with carriage return between each one.

           I set field PDU 1A1A to use a value list which gets the values from the value_list_pdu_1A1A field. The value_list_pdu_1A1A field is populated fine but instead of PDU 1A1A showing only 5 values to choose from. It just keeps adding to the value list. So if I start with 50. The value list in the next record will be 48, 49, 50, 51, 52 as it should be. Then if I select select 52 in this record the next record's value list contains 48, 49, 50, 51, 52, 53, 54. The value list never clears. It just keeps adding more values to the list forever... what am I doing wrong? Thanks for any help.

      Screen_Shot_2012-10-31_at_05.18.53.png

        • 1. Re: Dynamic value list should have 5 values but keeps growing after each record?
          philmodjunk

               If you define a value list with the "use values from a field" option, it lists all the values from the specified field from all records in your table. This is exactly what you are seeing in your value list. Such a value list is actually built from an "index" associated with that field.

               If you want each record to have a value list of just the values in PDU 1A1A for that one record, you'll need to set up a self join relationship so that you can use the "include only related values" option to limit the value list to values from the current record.