1 Reply Latest reply on Mar 13, 2012 1:38 PM by philmodjunk

    Filtered List



      Filtered List


      I have a found set with each record having tableA::Color and tableA::Cost among others. I need a comma sep list of each cost if Color= Red, Color= Black, etc.

      This is inside a script so I will make each listing a variable.


      Example Listing: 2,4,6,8,3,9




        • 1. Re: Filtered List

          So in your example, you have a found set of 6 records and the costs, from first record to last are the values shown?

          Working from a found set, you have two options:

          A Loop through the found set building your list one value at a time in the variable.

          Use a dedicated layout of just the cost field and then copy all records can copy these values as a return separated list of costs. This can then be pasted into a field and a simple calculation can replace the returns with commas. Note: a return separated list can be easier to work with in many cases, though a comma delimitted can be useful for display on your layout.

          The looping script:

          Go to Record/Request/page [first]
              Set Variable [$List ; value: $List & TableA::Cost & ","]
             Go to Record/Request/Page [next ; exit after last]
          End Loop
          Set Field [$List ; value: Left ( $List ; Length ( $List ) -1 ) //strip off the extra comma]