2 Replies Latest reply on Jan 31, 2015 1:23 PM by FentonJones

    Script fails when multiple BODY RECORDS



      Script fails when multiple BODY RECORDS


      First, I hate my accounting software, and it is not cheap or inexpensive software.  But it fails to do the job.  I found a report that has the data elements I need, that I cannot not get from its SmartLists.  

      I printed the report to a file.  Then I identified that DATA ROWs.  Data1 and Body.  

      Data1 is the Parent to the Body.  It is the Check and Body represents the invoices being paid.  I need the Check Data (Data1) to be shown on the Body Record.  

      I wrote my script in modules.  I tested each module.  I capture the data of Data1 in variables.  Then I go to the Body records to paste this information.  As long as there is only ONE Body record, it is fine.  When more than one it hangs.

      I have used this technique in a version 11 database .. and it would speed through the table.  Now it is not doing that.  I put REFRESH WINDOW steps in, but I should not need that.

      FMProAdv 13v04 on MacOS 10.10.1


        • 1. Re: Script fails when multiple BODY RECORDS

          Additional info about my posting, the fields starting with H are text calculations to pull the data out of the report body which is not show.  My calculation fields successfully extract the data.  There are about 3500 records to read and edit with this.

          • 2. Re: Script fails when multiple BODY RECORDS

            What I see is a Loop which will never stop if it runs into a record which does not match both of your If tests; because the Go to Record [ Next, Exit after last ] only happens if both If tests pass. It seems to me that Go to Record should happen whether those Ifs match or not; it should be just before the End Loop. Everything else will work the same, but the Loop can move between records, and stop after the last.