1 Reply Latest reply on Dec 8, 2015 6:05 AM by mikebeargie

    Importing sub-summary worksheet

    rcmurphy@mac.com

      Hi-- I can't figure out how to write a script that imports an Excel worksheet with a sub summary layout while filling in missing data. I would like to import the data and fill in the ID numbers in their associated row (i.e. copy 78900 up to 987650, then copy 987650 up to 543980, etc). It's a large excel worksheet with lots of codes associated with IDs, so I'd prefer to not do it in Excel.


      Any help is greatly appreciated


      It looks like this:


      ID                    CODE

      78900                    54

                                    67

                                    98

                                    Y6

      987650                  96

                                    90

                                    67

      543980                  25

                                    89

                                    B6 

        • 1. Re: Importing sub-summary worksheet
          mikebeargie

          Probably easier to do it in excel:

          Fill Blank Cells in Excel With Value from Above - YouTube

           

          Else, in filemaker you can write either a calculation using the GetNthRecord() function to replace the field contents of ID

          GetNthRecord

           

          Or write a script that loops through and fills whenever there is a blank value. (this assumes you're running it in the imported found set immediately after import.

          Go To Record [ first ]

          set variable [ $id ; table::id ]

          Loop

            if [ isempty(table::id) ]

               set field [ table::id ; $id ]

            else

               set variable [ $id ; table::id ]

            end if

            go to record [ next ; exit after last ]

          End Loop

          1 of 1 people found this helpful