AnsweredAssumed Answered

Global List Script Help

Question asked by Terri on Nov 23, 2012
Latest reply on Nov 23, 2012 by Terri

Title

Global List Script Help

Post

     I have a script created that is supposed to copy one field (Color_Desc) from all found records into a global field that will produce a list on my layout. The problem is, this script only returns the value from the last record in the found set - not all of them. Can you tell me what is going wrong?
      
     Set Variable [$Style: Value:WorkhorseStyles::Style Number]
     Set Variable [$Season: Value:WorkhorseStyles::Season]
     Set Variable [$SeasonYear: Value:WorkhorseStyles::Season_Year]
     New Window[]
     Go to Layout ["WorkhorseData_Current_Records" (WorkhorseData)]
     Enter Find Mode[]
     Set Field [WorkhorseData::Style_Num; $Style]
     Set Field [WorkhorseData::Season; $Season]
     Set Field [WorkhorseData::Season_Year; $SeasonYear]
     Perform Find[]
     Go to Record/Request/Page [First]
     Loop
         Set Variable [$ColorList; Value:WorkhorseData::Color_Desc]
         Go to Record/Request/Page [Next; Exit after last]
     End Loop
     Set Field [Globals::gColorList; $ColorList]
     Close Window [Current Window]
      
     Thanks!

Outcomes