1 Reply Latest reply on Aug 11, 2011 11:06 AM by philmodjunk

    Conditional Value lists

    pdoak_1

      Title

      Conditional Value lists

      Post

      I would like to sort a conditional value list in a particular order but I am struggling to get find out how to do it.  I have a table with four fields:

      • id
      • allocId
      • ActiveFlag
      • Name
      • Currency
      • Type
      I have set up a table relationship which selects records in this table where the activeFlag ="Active" and the conditional value list works in that it shows all records where the activeFlag field equals "active".  However, I would like to sort the value list like:
       
      • id
      • Type
      • Currency
      Is there a way to do this as the value list only gives one the option to sort based upon two fields?
       

        • 1. Re: Conditional Value lists
          philmodjunk

          Unfortunately, value lists that draw their values from fields are always sorted in ascending order. There is no simple setting to change that.

          Some developers have implented a work around where they assign a number of spaces to a second field in the value list and set the value list to sort on this field. This can work for small numbers of values if you don't need that second field in the value list to display other data. The other option is to avoid a value list altogether and display the values in a portal with buttons in the portal row that use scripts to assign the selected value to your field. The portal can be set to sort your values on any number of different fields in the portal's table.

          The "spaces" sort technique works like this:

          Field1: number, with unique values of 1, 2, 3 etc. to control the order.

          cSpaces: calculation field, Substitute ( 10^Field1 - 1 ; 9 ; " " )

          In your value list, select cSpaces as the Field 2 value and have your value list sort on the second value.