4 Replies Latest reply on Mar 10, 2012 7:09 AM by ericjlindholm

    values list sort by category

    ericjlindholm

      Title

      values list sort by category

      Post

      I have a valueslist that is placed in a "line items" portal called inventory ID.  It uses values from inventory ID.  it also lists the item name.  Right now it sort alphabetically.  In our inventory summary page. it sorts by the item category which is much more useful to me.  If i try to do this in my values list, it replaces the inventory which is how my tables are referenced.  I am sure there is a work-around for this.  Thank you.

        • 1. Re: values list sort by category
          philmodjunk

          Ascending order for the value in field 1 or field 2 are your only options for a value list that uses values from a field.

          There is a way to specify an arbitrary sort order if you only need to use values in one field, the second field then refers to a calculationfield that returns different numbers of spaces to provide an invisible sort order. That limits you to only one field for data and works best only for small numbers of values in your value list.

          There are two alternatives you can consider:

          1) use a conditional value list where you select the category from a value list in field 1 and then the conditional value list in field 2 only lists items from the selected category.

          2) Use a selection portal to display and select the values by clicking a row in the portal. This takes up more space on your screen, but since it's a portal, you can sort your portal records by category and then by name.

          • 2. Re: values list sort by category
            ericjlindholm

            I think the selection portal will work for me.  I will likely have it pop open in a new window.  I have been searching for a good thread on selection portals.  can you recommend one?  Thank you!

            • 3. Re: values list sort by category
              philmodjunk

              You might look at this demo file: http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html

              It goes quite a bit beyond what you describe here, but the portals at the bottom of the layout are set up with the fields as buttons that run scripts when a row is clicked and you can examine the script to see how data from the clicked portal row can be used in the script to enter data elsewhere in your database.

              • 4. Re: values list sort by category
                ericjlindholm

                This is the coolest thing since sliced bread!!! AWESOME!