AnsweredAssumed Answered

YAEQ - Reading and Writing files in scripts

Question asked by gregdc on Feb 11, 2014
Latest reply on Feb 11, 2014 by philmodjunk


YAEQ - Reading and Writing files in scripts


     Yet another elementary question:


     In FM13 I have these tables

     Person   Role   TempFile   ReportFile

     I need to read from Role, retrieve some information from Person, and then Write that to TempFile.    I will then read TempFile do some calcs and write Records to ReportFile. 

     Person is related to Role by a one-to-many relationship.  TempFile combines the info from Role & Person (FullName, RoleName, RoleStart, RoleEnd.   The TempFile is then processed to do the Summaries of For a given Year Who/how many are in a Role.  Those results are to be written to ReportFile and Displayed/Printed

     (My background is Basic/Fortran/Procedural programing, and am very new to FM scripting) 

     Now for the Elementary Question:

     I have tried this

     Go to Layout Role

     Go to Record First


     create a set of $Variables

     GoTo Layout TempFile

     Set Fields from $Variables

     Commit Records

     Go to Layout Original Layout

     Go to record next, Exit after Last

     End Loop

     I am watching the TempFile in another window.  Records appear there, then disappear.    I do not see what I am doing wrong.   Could someone point me in the right direction?  Please!