1 Reply Latest reply on Dec 24, 2008 8:50 AM by Jens Teich

    Value List

    milky

      Title

      Value List

      Post

      I have a value list with postcodes which has approx 3000 postcodes, but when the user types in a suburb e.g Melbourne, it only goes to the first 'M' ande does not allow the user to type 'MEL' and then choose what is there.

       

      Any Ideas.

       

      Thanks

       

      Milky.

        • 1. Re: Value List
          Jens Teich
             It is no fun scrolling in a value list of 3000 lines. There is a
          trick to ease this pain by reducing the value list. You need a
          global field where you enter 'm', 'mel' or so and a calculation
          which transforms the city names to sort of xmas (!) trees:

          M
          Me
          Mel
          Melb
          ...

          When you own an FM Advanced Version you can do this with a CF:

          // mlk (string) =
          Let([
          trim = Trim( string ) ;
          len = Length( trim ) ;
          rest = Left( trim ; len-1 )
          ];
          RightWords( trim ; 1 ) &
          If( len>1 ; "¶"& mlk( rest ))
          )

          Without FMA you can achieve a similar result concatenating output
          of the left() function with returns.

          Left( string ; 1 ) & "¶" &
          Left( string ; 2 ) & "¶" &
          Left( string ; 3 ) & "¶" &
          ...

          Now you create a relationship from the global field to the mlk
          field. 'mlk' means multi line key.

          Last step is the introduction of this relationship in the value
          list definition.

          Have fun.

          Jens