SlideShare a Scribd company logo
1 of 7
Download to read offline
FileMaker 7 AppleScript Reference                                                 .com Solutions Inc.
                                                                                  www.fmpromigrator.com

Overview
  FileMaker 7 introduces a new relational model for the FileMaker database. Introduction of this new
  relational model has required changes to the AppleScript support within FileMaker 7.
  This reference document provides a quick reference guide for commonly used FileMaker 6 and
  FileMaker 7 AppleScript code snippets. Each code example includes a description, FileMaker 6 (and
  below) AppleScript example code, and FileMaker 7 example code. In some cases these AppleScript
  code examples return a tab delimited forma�ed string of text, which makes it easier to process the
  results with other programs.
  Updated versions of this document may be downloaded from: www.fmpromigrator.com.

  AppleScript Tips:
  In the following code examples, when you see references to set myDBNum to 1 or
  set myTblNum to 1, you can loop thru the number of open databases or tables in order to obtain
  info for all databases/tables.
  When dealing with multiple versions of FileMaker running on the same computer, you may want to
  change the name of the FileMaker executable with the Finder in order to address a specific version of
  the application.

       Description                 FileMaker 6                              FileMaker 7
                                 AppleScript Code                         AppleScript Code
   list of              tell application “FileMaker Pro”         tell application “FileMaker Pro”
                          set myDbList to {}                       set myTableList to {}
   database/table         copy number of databases to              copy number of tables to
   names                mydbcount                                mytblcount
                          if mydbcount = 0 then                    if mytblcount = 0 then
                            display dialog “There are no             display dialog “There are
                        FileMaker databases open!” buttons       no FileMaker 7 databases open!”
                        “Ok” with icon stop giving up after      buttons “Ok” with icon stop giving
                        5                                        up after 5
                            else                                     else
                            repeat with dbLoop from 1 to             repeat with tblLoop from 1 to
                        mydbcount                                mytblcount
                            --get name of each database              --get name of each table
                            copy name of database dbLoop to          copy name of table tblLoop to
                        end of myDbList                          end of myTableList
                            end repeat                               end repeat
                          end if                                   end if
                          myDbList                                 myTableList
                        end tell                                 end tell
   FileMaker            tell application “FileMaker Pro”         tell application “FileMaker Pro”
                          version                                  version
   version              end tell                                 end tell
   count of tables      N/A                                      tell application “FileMaker Pro”
                                                                   set myDBNum to 1
                                                                   set myTableCount to the count of
                                                                 every table of database myDBNum
                                                                 end tell




                                                                                                   REV 02   4/29/2004
www.fmpromigrator.com
                                                                                                    Page 1
FileMaker 7 AppleScript Reference
        Description                  FileMaker 6                                 FileMaker 7
                                   AppleScript Code                            AppleScript Code
   list of field names   tell application “FileMaker Pro”
                            set myDbNum to 1
                                                                     tell application “FileMaker Pro”
                                                                        set myTblNum to 1
                            set myFieldList to “”                       set myDBNum to 1
                            set myFieldIdList to the ID of every        set myFieldList to “”
                         field of layout 0 of database myDbNum          set myFieldIdList to the ID of every
                            set myFieldCount to the count of         field of table myTblNum of database
                         every field of layout 0 of database         myDBNum
                         myDbNum                                        set myFieldCount to the count of
                            if myFieldCount > 1 then                 every field of table myTblNum of database
                              set i to 1                             myDBNum
                              repeat with i from 1 to the count         if myFieldCount > 1 then
                         of myFieldIdList                                 set i to 1
                              set myFieldItem to the name of field        repeat with i from 1 to the count of
                         ID (item i of myFieldIdList) of layout      myFieldIdList
                         0 of database myDbNum                            set myFieldItem to the name of field
                              set myFieldList to myFieldList &       ID (item i of myFieldIdList) of table
                         myFieldItem & tab                           myTblNum of database myDBNum
                              set i to i + 1                              set myFieldList to myFieldList &
                              end repeat                             myFieldItem & tab
                         myFieldList                                      set i to i + 1
                              else                                        end repeat
                              set myFieldList to the name of field      myFieldList
                         1 of layout 0 of database myDbNum              else
                              myFieldList                               set myFieldList to the name of field 1
                              end if                                 of table myTblNum of database myDBNum
                         end tell                                       myFieldList
                                                                        end if
                                                                     end tell

   database field        tell application “FileMaker Pro”
                           set myDbNum to 1
                                                                     tell application “FileMaker Pro”
                                                                       set myTblNum to 1
   IDs                     get id of every field of layout 0 of        set myDBNum to 1
                         database myDbNum                              get the id of every field of table
                         end tell                                    myTblNum of database myDBNum
                                                                     end tell

   field types           tell application “FileMaker Pro”
                           set myDbNum to 1
                                                                     tell application “FileMaker Pro”
                                                                       set myTblNum to 1
                           get default type of every field of          set myDBNum to 1
                         layout 0 of database myDbNum                  get default type of every field of
                         end tell                                    table myTblNum of database myDBNum
                                                                     end tell

                                    Returned Values                             Returned Values
                         Numeric Fields     doub                     Numeric Fields     real
                         Text Fields        TEXT                     Text Fields        string
                         Date/Time Fields ldt                        Date/Time Fields date
                         Container Fields PICT                       Container Fields PICTURE
   field NULLSOK         tell application “FileMaker Pro”
                           set myDbNum to 1
                                                                     tell application “FileMaker Pro”
                                                                       set myTblNum to 1
   a�ributes               get nulls OK of every field of layout       set myDBNum to 1
                         0 of database myDbNum                         get nulls OK of every field of table
                         end tell                                    myTblNum of database myDBNum
                                                                     end tell




www.fmpromigrator.com
                                                                                                        Page 2
FileMaker 7 AppleScript Reference

        Description                 FileMaker 6                               FileMaker 7
                                  AppleScript Code                          AppleScript Code
   field formulas       tell application “FileMaker Pro”
                           set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
                           set myFormulaList to “”                  set myDBNum to 1
                           set myFieldIdList to the ID of every     set myFormulaList to “”
                        field of layout 0 of database myDbNum       set myFormulaList2 to “”
                           set myFieldCount to the count of         set myFormulaList to the formula of
                        every field of layout 0 of database       every field of table myTblNum of database
                        myDbNum                                   myDBNum
                           if myFieldCount > 1 then                 set myFieldCount to the count of every
                             set i to 1                           item of myFormulaList
                             repeat with i from 1 to the count      if myFieldCount > 1 then
                        of myFieldIdList                              set i to 1
                             set myFieldItem to the formula of        repeat with i from 1 to myFieldCount
                        field ID (item i of myFieldIdList) of         set myFieldItem to “”
                        layout 0 of database myDbNum                  set myFieldItem to item i of
                             set myFormulaList to myFormulaList   myFormulaList
                        & myFieldItem & tab                           set myFormulaList2 to myFormulaList2
                             set i to i + 1                       & myFieldItem & tab
                             end repeat                               set i to i + 1
                        myFormulaList                                 end repeat
                           else                                     end if
                           set myFormulaList to the formula of    myFormulaList2
                        field 1 of layout 0 of database myDbNum   end tell
                           myFormulaList
                           end if
                                                                  Note: With FileMaker 7 the text “FileMaker”
                        end tell                                  is now returned for every field which does
                                                                  not contain a calculation formula.

   field repeat sizes   tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
                          get repeat size of every field of         set myDBNum to 1
                        layout 0 of database myDbNum                get repeat size of every field of table
                        end tell                                  myTblNum of database myDBNum
                                                                  end tell

   field unique         tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
   value a�ributes        get unique value of every field of        set myDBNum to 1
                        layout 0 of database myDbNum                get unique value of every field of
                        end tell                                  table myTblNum of database myDBNum
                                                                  end tell

   field globalValue    tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
   a�ributes              get globalValue of every field of         set myDBNum to 1
                        layout 0 of database myDbNum                get globalValue of every field of table
                        end tell                                  myTblNum of database myDBNum
                                                                  end tell

   field protection     tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
   a�ribute               get protection of every field of          set myDBNum to 1
                        layout 0 of database myDbNum                get protection of every field of table
                        end tell                                  myTblNum of database myDBNum
                                                                  end tell

   field access         tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
   a�ribute               get access of every field of layout 0     set myDBNum to 1
                        of database myDbNum                         get access of every field of table
                        end tell                                  myTblNum of database myDBNum
                                                                  end tell




www.fmpromigrator.com
                                                                                                        Page 3
FileMaker 7 AppleScript Reference

        Description                FileMaker 6                                FileMaker 7
                                 AppleScript Code                           AppleScript Code
   script IDs           tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                  -- scripts are now global to the
                          get ID of every FileMaker script of     -- entire FileMaker 7 database
                        database myDbNum                            set myScriptCount to the count of
                        end tell                                  every FileMaker script
                                                                    set myScriptIdList to {}
                                                                    if myScriptCount > 0 then
                                                                      set myScriptIdList to the ID of
                                                                  every FileMaker script
                                                                    end if
                                                                  myScriptIdList
                                                                  end tell

   script names         tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myTblNum to 1
                          set myScriptList to “”                    set myDBNum to 1
                          set myScriptIdList to {}                  set myScriptList to {}
                          set myScriptCount to 0                    set myScriptIdList to {}
                          set myScriptIdList to the ID of every     set myScriptCount to the count of
                        FileMaker script of database myDbNum      every FileMaker script
                          set myScriptCount to the count of         if myScriptCount > 1 then
                        FileMaker scripts of database myDbNum         set myScriptIdList to the ID of
                          if myScriptCount > 1 then               every FileMaker script
                          repeat with i from 1 to the count of        repeat with i from 1 to the count of
                        myScriptIdList                            myScriptIdList
                            set myScriptItem to the name                 set myScriptItem to the name
                        of FileMaker script ID (item i of         of FileMaker script ID (item i of
                        myScriptIdList) of database myDbNum       myScriptIdList) of database myDBNum
                            set myScriptList to myScriptList &           set myScriptList to myScriptList &
                        myScriptItem & tab                        myScriptItem & tab
                            set i to i + 1                               set i to i + 1
                          end repeat                                  end repeat
                          myScriptList                              myScriptList
                          else                                      else
                          if myScriptCount = 1 then                 if myScriptCount = 1 then
                            set myScriptName to the name of           set myScriptName to the name of
                        FileMaker script 1 of database myDbNum    FileMaker script 1 of database myDBNum
                          else                                      else
                            set myScriptName to “”                    set myScriptName to “”
                          end if                                    end if
                        myScriptName                              myScriptName
                        end if                                    end if
                        end tell                                  end tell

   layout IDs           tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myDbNum to 1
                          get ID of every layout of database        get the ID of every layout of database
                        myDbNum                                   myDbNum
                        end tell                                  end tell




www.fmpromigrator.com
                                                                                                    Page 4
FileMaker 7 AppleScript Reference

        Description                FileMaker 6                               FileMaker 7
                                 AppleScript Code                          AppleScript Code
   layout names         tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myDBNum to 1
                          set myLayoutList to “”                    set myLayoutList to “”
                          set myLayoutIdList to the ID of every     set myLayoutIdList to the ID of every
                        layout of database myDbNum                layout of database myDBNum
                          set myLayoutCount to the count of         set myLayoutCount to the count of
                        every layout of database myDbNum          every layout of database myDBNum
                          if myLayoutCount > 1 then                 if myLayoutCount > 1 then
                          set i to 1                                set i to 1
                          repeat with i from 1 to the count of      repeat with i from 1 to the count of
                        myLayoutIdList                            myLayoutIdList
                            set myLayoutItem to the name of           set myLayoutItem to the name of
                        layout ID (item i of myLayoutIdList) of   layout ID (item i of myLayoutIdList) of
                        database myDbNum                          database myDBNum
                            set myLayoutList to myLayoutList &        set myLayoutList to myLayoutList &
                        myLayoutItem & tab                        myLayoutItem & tab
                            set i to i + 1                            set i to i + 1
                          end repeat                                  end repeat
                          myLayoutList                              myLayoutList
                          else                                      else
                          set myLayoutList to the name of           set myLayoutList to the name of layout
                        layout 1 of database myDbNum              1 of database myDBNum
                          myLayoutList                              myLayoutList
                        end if                                      end if
                        end tell                                  end tell

   layout protection    tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myDocNum to 1
   a�ribute               get protection of every layout of       get protection of every layout of
                        database myDbNum                          document myDocNum
                        end tell                                  end tell

   layout access        tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myDbNum to 1
   a�ribute               get access of every layout of             get access of every layout of database
                        database myDbNum                          myDbNum
                        end tell                                  end tell

   layout lock          tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                  tell application “FileMaker Pro”
                                                                    set myDocNum to 1
   a�ribute               get count of layouts of database         get count of layouts of document
                        myDbNum                                   myDocNum
                          copy (count of layouts of database        copy (count of layouts of document
                        myDbNum) to myLayoutCount                 myDocNum) to myLayoutCount
                          set myLayoutFields to {}                  set myLayoutFields to {}
                          set i to 1                                set i to 1
                          repeat until i > myLayoutCount            repeat until i > myLayoutCount
                            get lock of layout i of database          get lock of layout i of document
                        myDbNum                                   myDocNum
                            copy the result to end of                 copy the result to end of
                        myLayoutFields                            myLayoutFields
                            set i to i + 1                            set i to i + 1
                            end repeat                                end repeat
                        myLayoutFields                            myLayoutFields
                        end tell                                  end tell




www.fmpromigrator.com
                                                                                                      Page 5
FileMaker 7 AppleScript Reference

        Description                FileMaker 6                                  FileMaker 7
                                 AppleScript Code                             AppleScript Code
   field names by       tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                    tell application “FileMaker Pro”
                                                                      set myTblNum to 1
   layout                 set myLayoutCount to the count of           set myDocNum to 1
                        every layout of database myDbNum              set myLayoutCount to the count of
                          set myLayoutIdList to the ID of every     every layout
                        layout of database myDbNum                    set myLayoutIdList to the ID of every
                                set myLayoutFields to “”            layout of document myDocNum
                          if myLayoutCount > 1 then                   set myLayoutFields to “”
                          repeat with i from 1 to myLayoutCount       if myLayoutCount > 1 then
                            set myLayoutIDNumber to item i of         repeat with i from 1 to myLayoutCount
                        myLayoutIdList                                   set myLayoutIDNumber to item i of
                            copy (count of fields of layout ID      myLayoutIdList
                        myLayoutIDNumber of database myDbNum)            copy (count of fields of layout
                        to myFieldCount                             ID myLayoutIDNumber of document 1) to
                            set myLayoutFields to myLayoutFields    myFieldCount
                        & myFieldCount & tab                             set myLayoutFields to myLayoutFields
                               repeat with j from 1 to              & myFieldCount & tab
                        myFieldCount                                     repeat with j from 1 to myFieldCount
                               copy the name of field j of layout        copy the name of field j of layout ID
                        ID myLayoutIDNumber of database myDbNum     myLayoutIDNumber of document myDocNum to
                        to myFieldName                              myFieldName
                               set myLayoutFields to                     set myLayoutFields to myLayoutFields
                        myLayoutFields & myFieldName & tab          & myFieldName & tab
                               set j to j + 1                            set j to j + 1
                               end repeat                                end repeat
                            set i to i + 1                            set i to i + 1
                            end repeat                              end repeat
                          myLayoutFields                            myLayoutFields
                          else                                      else
                          -- only 1 layout in database              -- only 1 layout in database
                          -- return value is not a list so          -- return value is not a list so
                          -- process it differently                 -- process it differently
                          set myLayoutIDNumber to myLayoutIdList      set myLayoutIDNumber to myLayoutIdList
                          myLayoutIdList                              myLayoutIdList
                          copy (count of fields of layout ID          copy (count of fields of layout ID
                        myLayoutIDNumber of database myDbNum)       myLayoutIDNumber of document myDocNum)
                        to myFieldCount                             to myFieldCount
                          set myLayoutFields to myLayoutFields        set myLayoutFields to myLayoutFields &
                        & myFieldCount & tab                        myFieldCount & tab
                          repeat with j from 1 to myFieldCount        repeat with j from 1 to myFieldCount
                            copy the name of field j of layout        copy the name of field j of layout ID
                        ID myLayoutIDNumber of database myDbNum     myLayoutIDNumber of document myDocNum to
                        to myFieldName                              myFieldName
                            set myLayoutFields to myLayoutFields      set myLayoutFields to myLayoutFields &
                        & myFieldName & tab                         myFieldName & tab
                            set j to j + 1                            set j to j + 1
                            end repeat                                end repeat
                        myLayoutFields                              myLayoutFields
                        end if                                      end if
                        end tell                                    end tell




www.fmpromigrator.com
                                                                                                       Page 6
FileMaker 7 AppleScript Reference

        Description                FileMaker 6                                FileMaker 7
                                 AppleScript Code                           AppleScript Code
   value lists by       tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                   tell application “FileMaker Pro”
                                                                     set myDocNum to 1
   layout field           get count of layouts of database           set myValueLists to {}
                        myDbNum                                      get choices of every field of document
                          copy (count of layouts of database       myDocNum
                        myDbNum) to myLayoutCount                    copy the result to end of myValueLists
                          set myValueLists to {}                   myValueLists
                          set i to 1                               end tell
                          repeat until i > myLayoutCount
                            copy (count of fields of layout i
                        of database myDbNum) & tab to end of
                        myValueLists
                            get choices of every field of layout
                        i of database myDbNum
                            copy the result to end of
                        myValueLists
                            set i to i + 1
                          end repeat
                        myValueLists
                        end tell

   layout visible       tell application “FileMaker Pro”
                          set myDbNum to 1
                                                                   tell application “FileMaker Pro”
                                                                     set myDocNum to 1
   a�ribute               get count of layouts of database           get count of layouts of document
                        myDbNum                                    myDocNum
                          copy (count of layouts of database         copy (count of layouts of document
                        myDbNum) to myLayoutCount                  myDocNum) to myLayoutCount
                          set myLayoutFields to {}                   set myLayoutFields to {}
                          set i to 1                                 set i to 1
                          repeat until i > myLayoutCount             repeat until i > myLayoutCount
                            get visible of layout i                    get visible of layout i
                            copy the result to end of                  copy the result to end of
                        myLayoutFields                             myLayoutFields
                            set i to i + 1                             set i to i + 1
                            end repeat                               end repeat
                        myLayoutFields                             myLayoutFields
                        end tell                                   end tell




www.fmpromigrator.com
                                                                                                     Page 7

More Related Content

Viewers also liked

PHP for Android: prototyping Android apps in php
PHP for Android: prototyping Android apps in phpPHP for Android: prototyping Android apps in php
PHP for Android: prototyping Android apps in phpCesare D'Amico
 
Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...
Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...
Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...Johanna Miller
 
Loans Today- Spend Money Without Caring About Saving Due To Our Loan!
Loans Today- Spend Money Without Caring About Saving Due To Our Loan!Loans Today- Spend Money Without Caring About Saving Due To Our Loan!
Loans Today- Spend Money Without Caring About Saving Due To Our Loan!Loan today
 
Android Fast Track CRUD Android PHP MySql
Android Fast Track CRUD Android PHP MySqlAndroid Fast Track CRUD Android PHP MySql
Android Fast Track CRUD Android PHP MySqlAgus Haryanto
 
Seminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaSeminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaPrashant Gupta
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computingRkrishna Mishra
 

Viewers also liked (9)

PHP for Android: prototyping Android apps in php
PHP for Android: prototyping Android apps in phpPHP for Android: prototyping Android apps in php
PHP for Android: prototyping Android apps in php
 
Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...
Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...
Email Converter | Entourage to Outlook | Thunderbird to Outlook | Apple Mail ...
 
Loans Today- Spend Money Without Caring About Saving Due To Our Loan!
Loans Today- Spend Money Without Caring About Saving Due To Our Loan!Loans Today- Spend Money Without Caring About Saving Due To Our Loan!
Loans Today- Spend Money Without Caring About Saving Due To Our Loan!
 
BANKING SYSTEM
BANKING SYSTEMBANKING SYSTEM
BANKING SYSTEM
 
Android Fast Track CRUD Android PHP MySql
Android Fast Track CRUD Android PHP MySqlAndroid Fast Track CRUD Android PHP MySql
Android Fast Track CRUD Android PHP MySql
 
Cloud computing ppt
Cloud computing pptCloud computing ppt
Cloud computing ppt
 
Seminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaSeminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant Gupta
 
Data mining
Data miningData mining
Data mining
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 

More from FrescatiStory

Colina crucilor, Lituania
Colina crucilor, LituaniaColina crucilor, Lituania
Colina crucilor, LituaniaFrescatiStory
 
Palatul lui Gigi Becali
Palatul lui Gigi BecaliPalatul lui Gigi Becali
Palatul lui Gigi BecaliFrescatiStory
 
Le marché aux oignons à Berne, Suisse
Le marché aux oignons à Berne, SuisseLe marché aux oignons à Berne, Suisse
Le marché aux oignons à Berne, SuisseFrescatiStory
 
Crucea Caraiman (Crucea Eroilor Neamului)
Crucea Caraiman (Crucea Eroilor Neamului)Crucea Caraiman (Crucea Eroilor Neamului)
Crucea Caraiman (Crucea Eroilor Neamului)FrescatiStory
 
A fi părinte în lumea animalelor - Parenting Moments in the Animal World
A fi părinte în lumea animalelor - Parenting Moments in the Animal WorldA fi părinte în lumea animalelor - Parenting Moments in the Animal World
A fi părinte în lumea animalelor - Parenting Moments in the Animal WorldFrescatiStory
 
România. Lecția de istorie
România. Lecția de istorieRomânia. Lecția de istorie
România. Lecția de istorieFrescatiStory
 
Alertă medicală - Un osuț foarte ascuțit
Alertă medicală - Un osuț foarte ascuțitAlertă medicală - Un osuț foarte ascuțit
Alertă medicală - Un osuț foarte ascuțitFrescatiStory
 
Large Easter eggs around the world
Large Easter eggs around the worldLarge Easter eggs around the world
Large Easter eggs around the worldFrescatiStory
 
Patru secrete ale telefonului tău mobil
Patru secrete ale telefonului tău mobilPatru secrete ale telefonului tău mobil
Patru secrete ale telefonului tău mobilFrescatiStory
 
Populația mahomedană în Europa
Populația mahomedană în EuropaPopulația mahomedană în Europa
Populația mahomedană în EuropaFrescatiStory
 
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photoPlus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photoFrescatiStory
 
Niciodata toamna n-a fost mai frumoasa
Niciodata toamna n-a fost mai frumoasaNiciodata toamna n-a fost mai frumoasa
Niciodata toamna n-a fost mai frumoasaFrescatiStory
 

More from FrescatiStory (20)

Șomerul
ȘomerulȘomerul
Șomerul
 
Colina crucilor, Lituania
Colina crucilor, LituaniaColina crucilor, Lituania
Colina crucilor, Lituania
 
Palatul lui Gigi Becali
Palatul lui Gigi BecaliPalatul lui Gigi Becali
Palatul lui Gigi Becali
 
Le marché aux oignons à Berne, Suisse
Le marché aux oignons à Berne, SuisseLe marché aux oignons à Berne, Suisse
Le marché aux oignons à Berne, Suisse
 
Photos inusitées
Photos inusitéesPhotos inusitées
Photos inusitées
 
Beautiful Greece
Beautiful GreeceBeautiful Greece
Beautiful Greece
 
Crucea Caraiman (Crucea Eroilor Neamului)
Crucea Caraiman (Crucea Eroilor Neamului)Crucea Caraiman (Crucea Eroilor Neamului)
Crucea Caraiman (Crucea Eroilor Neamului)
 
A fi părinte în lumea animalelor - Parenting Moments in the Animal World
A fi părinte în lumea animalelor - Parenting Moments in the Animal WorldA fi părinte în lumea animalelor - Parenting Moments in the Animal World
A fi părinte în lumea animalelor - Parenting Moments in the Animal World
 
România. Lecția de istorie
România. Lecția de istorieRomânia. Lecția de istorie
România. Lecția de istorie
 
Islamism
IslamismIslamism
Islamism
 
Alertă medicală - Un osuț foarte ascuțit
Alertă medicală - Un osuț foarte ascuțitAlertă medicală - Un osuț foarte ascuțit
Alertă medicală - Un osuț foarte ascuțit
 
Oameni, destine
Oameni, destineOameni, destine
Oameni, destine
 
Large Easter eggs around the world
Large Easter eggs around the worldLarge Easter eggs around the world
Large Easter eggs around the world
 
Patru secrete ale telefonului tău mobil
Patru secrete ale telefonului tău mobilPatru secrete ale telefonului tău mobil
Patru secrete ale telefonului tău mobil
 
Populația mahomedană în Europa
Populația mahomedană în EuropaPopulația mahomedană în Europa
Populația mahomedană în Europa
 
Bucovina altui veac
Bucovina altui veacBucovina altui veac
Bucovina altui veac
 
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photoPlus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
 
Noiembrie frumoasă
Noiembrie frumoasăNoiembrie frumoasă
Noiembrie frumoasă
 
Niciodata toamna n-a fost mai frumoasa
Niciodata toamna n-a fost mai frumoasaNiciodata toamna n-a fost mai frumoasa
Niciodata toamna n-a fost mai frumoasa
 
Salina Turda
Salina TurdaSalina Turda
Salina Turda
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

File Maker 7 Apple Script Reference

  • 1. FileMaker 7 AppleScript Reference .com Solutions Inc. www.fmpromigrator.com Overview FileMaker 7 introduces a new relational model for the FileMaker database. Introduction of this new relational model has required changes to the AppleScript support within FileMaker 7. This reference document provides a quick reference guide for commonly used FileMaker 6 and FileMaker 7 AppleScript code snippets. Each code example includes a description, FileMaker 6 (and below) AppleScript example code, and FileMaker 7 example code. In some cases these AppleScript code examples return a tab delimited forma�ed string of text, which makes it easier to process the results with other programs. Updated versions of this document may be downloaded from: www.fmpromigrator.com. AppleScript Tips: In the following code examples, when you see references to set myDBNum to 1 or set myTblNum to 1, you can loop thru the number of open databases or tables in order to obtain info for all databases/tables. When dealing with multiple versions of FileMaker running on the same computer, you may want to change the name of the FileMaker executable with the Finder in order to address a specific version of the application. Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code list of tell application “FileMaker Pro” tell application “FileMaker Pro” set myDbList to {} set myTableList to {} database/table copy number of databases to copy number of tables to names mydbcount mytblcount if mydbcount = 0 then if mytblcount = 0 then display dialog “There are no display dialog “There are FileMaker databases open!” buttons no FileMaker 7 databases open!” “Ok” with icon stop giving up after buttons “Ok” with icon stop giving 5 up after 5 else else repeat with dbLoop from 1 to repeat with tblLoop from 1 to mydbcount mytblcount --get name of each database --get name of each table copy name of database dbLoop to copy name of table tblLoop to end of myDbList end of myTableList end repeat end repeat end if end if myDbList myTableList end tell end tell FileMaker tell application “FileMaker Pro” tell application “FileMaker Pro” version version version end tell end tell count of tables N/A tell application “FileMaker Pro” set myDBNum to 1 set myTableCount to the count of every table of database myDBNum end tell REV 02 4/29/2004 www.fmpromigrator.com Page 1
  • 2. FileMaker 7 AppleScript Reference Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code list of field names tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 set myFieldList to “” set myDBNum to 1 set myFieldIdList to the ID of every set myFieldList to “” field of layout 0 of database myDbNum set myFieldIdList to the ID of every set myFieldCount to the count of field of table myTblNum of database every field of layout 0 of database myDBNum myDbNum set myFieldCount to the count of if myFieldCount > 1 then every field of table myTblNum of database set i to 1 myDBNum repeat with i from 1 to the count if myFieldCount > 1 then of myFieldIdList set i to 1 set myFieldItem to the name of field repeat with i from 1 to the count of ID (item i of myFieldIdList) of layout myFieldIdList 0 of database myDbNum set myFieldItem to the name of field set myFieldList to myFieldList & ID (item i of myFieldIdList) of table myFieldItem & tab myTblNum of database myDBNum set i to i + 1 set myFieldList to myFieldList & end repeat myFieldItem & tab myFieldList set i to i + 1 else end repeat set myFieldList to the name of field myFieldList 1 of layout 0 of database myDbNum else myFieldList set myFieldList to the name of field 1 end if of table myTblNum of database myDBNum end tell myFieldList end if end tell database field tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 IDs get id of every field of layout 0 of set myDBNum to 1 database myDbNum get the id of every field of table end tell myTblNum of database myDBNum end tell field types tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 get default type of every field of set myDBNum to 1 layout 0 of database myDbNum get default type of every field of end tell table myTblNum of database myDBNum end tell Returned Values Returned Values Numeric Fields doub Numeric Fields real Text Fields TEXT Text Fields string Date/Time Fields ldt Date/Time Fields date Container Fields PICT Container Fields PICTURE field NULLSOK tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 a�ributes get nulls OK of every field of layout set myDBNum to 1 0 of database myDbNum get nulls OK of every field of table end tell myTblNum of database myDBNum end tell www.fmpromigrator.com Page 2
  • 3. FileMaker 7 AppleScript Reference Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code field formulas tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 set myFormulaList to “” set myDBNum to 1 set myFieldIdList to the ID of every set myFormulaList to “” field of layout 0 of database myDbNum set myFormulaList2 to “” set myFieldCount to the count of set myFormulaList to the formula of every field of layout 0 of database every field of table myTblNum of database myDbNum myDBNum if myFieldCount > 1 then set myFieldCount to the count of every set i to 1 item of myFormulaList repeat with i from 1 to the count if myFieldCount > 1 then of myFieldIdList set i to 1 set myFieldItem to the formula of repeat with i from 1 to myFieldCount field ID (item i of myFieldIdList) of set myFieldItem to “” layout 0 of database myDbNum set myFieldItem to item i of set myFormulaList to myFormulaList myFormulaList & myFieldItem & tab set myFormulaList2 to myFormulaList2 set i to i + 1 & myFieldItem & tab end repeat set i to i + 1 myFormulaList end repeat else end if set myFormulaList to the formula of myFormulaList2 field 1 of layout 0 of database myDbNum end tell myFormulaList end if Note: With FileMaker 7 the text “FileMaker” end tell is now returned for every field which does not contain a calculation formula. field repeat sizes tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 get repeat size of every field of set myDBNum to 1 layout 0 of database myDbNum get repeat size of every field of table end tell myTblNum of database myDBNum end tell field unique tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 value a�ributes get unique value of every field of set myDBNum to 1 layout 0 of database myDbNum get unique value of every field of end tell table myTblNum of database myDBNum end tell field globalValue tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 a�ributes get globalValue of every field of set myDBNum to 1 layout 0 of database myDbNum get globalValue of every field of table end tell myTblNum of database myDBNum end tell field protection tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 a�ribute get protection of every field of set myDBNum to 1 layout 0 of database myDbNum get protection of every field of table end tell myTblNum of database myDBNum end tell field access tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 a�ribute get access of every field of layout 0 set myDBNum to 1 of database myDbNum get access of every field of table end tell myTblNum of database myDBNum end tell www.fmpromigrator.com Page 3
  • 4. FileMaker 7 AppleScript Reference Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code script IDs tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” -- scripts are now global to the get ID of every FileMaker script of -- entire FileMaker 7 database database myDbNum set myScriptCount to the count of end tell every FileMaker script set myScriptIdList to {} if myScriptCount > 0 then set myScriptIdList to the ID of every FileMaker script end if myScriptIdList end tell script names tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 set myScriptList to “” set myDBNum to 1 set myScriptIdList to {} set myScriptList to {} set myScriptCount to 0 set myScriptIdList to {} set myScriptIdList to the ID of every set myScriptCount to the count of FileMaker script of database myDbNum every FileMaker script set myScriptCount to the count of if myScriptCount > 1 then FileMaker scripts of database myDbNum set myScriptIdList to the ID of if myScriptCount > 1 then every FileMaker script repeat with i from 1 to the count of repeat with i from 1 to the count of myScriptIdList myScriptIdList set myScriptItem to the name set myScriptItem to the name of FileMaker script ID (item i of of FileMaker script ID (item i of myScriptIdList) of database myDbNum myScriptIdList) of database myDBNum set myScriptList to myScriptList & set myScriptList to myScriptList & myScriptItem & tab myScriptItem & tab set i to i + 1 set i to i + 1 end repeat end repeat myScriptList myScriptList else else if myScriptCount = 1 then if myScriptCount = 1 then set myScriptName to the name of set myScriptName to the name of FileMaker script 1 of database myDbNum FileMaker script 1 of database myDBNum else else set myScriptName to “” set myScriptName to “” end if end if myScriptName myScriptName end if end if end tell end tell layout IDs tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDbNum to 1 get ID of every layout of database get the ID of every layout of database myDbNum myDbNum end tell end tell www.fmpromigrator.com Page 4
  • 5. FileMaker 7 AppleScript Reference Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code layout names tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDBNum to 1 set myLayoutList to “” set myLayoutList to “” set myLayoutIdList to the ID of every set myLayoutIdList to the ID of every layout of database myDbNum layout of database myDBNum set myLayoutCount to the count of set myLayoutCount to the count of every layout of database myDbNum every layout of database myDBNum if myLayoutCount > 1 then if myLayoutCount > 1 then set i to 1 set i to 1 repeat with i from 1 to the count of repeat with i from 1 to the count of myLayoutIdList myLayoutIdList set myLayoutItem to the name of set myLayoutItem to the name of layout ID (item i of myLayoutIdList) of layout ID (item i of myLayoutIdList) of database myDbNum database myDBNum set myLayoutList to myLayoutList & set myLayoutList to myLayoutList & myLayoutItem & tab myLayoutItem & tab set i to i + 1 set i to i + 1 end repeat end repeat myLayoutList myLayoutList else else set myLayoutList to the name of set myLayoutList to the name of layout layout 1 of database myDbNum 1 of database myDBNum myLayoutList myLayoutList end if end if end tell end tell layout protection tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDocNum to 1 a�ribute get protection of every layout of get protection of every layout of database myDbNum document myDocNum end tell end tell layout access tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDbNum to 1 a�ribute get access of every layout of get access of every layout of database database myDbNum myDbNum end tell end tell layout lock tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDocNum to 1 a�ribute get count of layouts of database get count of layouts of document myDbNum myDocNum copy (count of layouts of database copy (count of layouts of document myDbNum) to myLayoutCount myDocNum) to myLayoutCount set myLayoutFields to {} set myLayoutFields to {} set i to 1 set i to 1 repeat until i > myLayoutCount repeat until i > myLayoutCount get lock of layout i of database get lock of layout i of document myDbNum myDocNum copy the result to end of copy the result to end of myLayoutFields myLayoutFields set i to i + 1 set i to i + 1 end repeat end repeat myLayoutFields myLayoutFields end tell end tell www.fmpromigrator.com Page 5
  • 6. FileMaker 7 AppleScript Reference Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code field names by tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myTblNum to 1 layout set myLayoutCount to the count of set myDocNum to 1 every layout of database myDbNum set myLayoutCount to the count of set myLayoutIdList to the ID of every every layout layout of database myDbNum set myLayoutIdList to the ID of every set myLayoutFields to “” layout of document myDocNum if myLayoutCount > 1 then set myLayoutFields to “” repeat with i from 1 to myLayoutCount if myLayoutCount > 1 then set myLayoutIDNumber to item i of repeat with i from 1 to myLayoutCount myLayoutIdList set myLayoutIDNumber to item i of copy (count of fields of layout ID myLayoutIdList myLayoutIDNumber of database myDbNum) copy (count of fields of layout to myFieldCount ID myLayoutIDNumber of document 1) to set myLayoutFields to myLayoutFields myFieldCount & myFieldCount & tab set myLayoutFields to myLayoutFields repeat with j from 1 to & myFieldCount & tab myFieldCount repeat with j from 1 to myFieldCount copy the name of field j of layout copy the name of field j of layout ID ID myLayoutIDNumber of database myDbNum myLayoutIDNumber of document myDocNum to to myFieldName myFieldName set myLayoutFields to set myLayoutFields to myLayoutFields myLayoutFields & myFieldName & tab & myFieldName & tab set j to j + 1 set j to j + 1 end repeat end repeat set i to i + 1 set i to i + 1 end repeat end repeat myLayoutFields myLayoutFields else else -- only 1 layout in database -- only 1 layout in database -- return value is not a list so -- return value is not a list so -- process it differently -- process it differently set myLayoutIDNumber to myLayoutIdList set myLayoutIDNumber to myLayoutIdList myLayoutIdList myLayoutIdList copy (count of fields of layout ID copy (count of fields of layout ID myLayoutIDNumber of database myDbNum) myLayoutIDNumber of document myDocNum) to myFieldCount to myFieldCount set myLayoutFields to myLayoutFields set myLayoutFields to myLayoutFields & & myFieldCount & tab myFieldCount & tab repeat with j from 1 to myFieldCount repeat with j from 1 to myFieldCount copy the name of field j of layout copy the name of field j of layout ID ID myLayoutIDNumber of database myDbNum myLayoutIDNumber of document myDocNum to to myFieldName myFieldName set myLayoutFields to myLayoutFields set myLayoutFields to myLayoutFields & & myFieldName & tab myFieldName & tab set j to j + 1 set j to j + 1 end repeat end repeat myLayoutFields myLayoutFields end if end if end tell end tell www.fmpromigrator.com Page 6
  • 7. FileMaker 7 AppleScript Reference Description FileMaker 6 FileMaker 7 AppleScript Code AppleScript Code value lists by tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDocNum to 1 layout field get count of layouts of database set myValueLists to {} myDbNum get choices of every field of document copy (count of layouts of database myDocNum myDbNum) to myLayoutCount copy the result to end of myValueLists set myValueLists to {} myValueLists set i to 1 end tell repeat until i > myLayoutCount copy (count of fields of layout i of database myDbNum) & tab to end of myValueLists get choices of every field of layout i of database myDbNum copy the result to end of myValueLists set i to i + 1 end repeat myValueLists end tell layout visible tell application “FileMaker Pro” set myDbNum to 1 tell application “FileMaker Pro” set myDocNum to 1 a�ribute get count of layouts of database get count of layouts of document myDbNum myDocNum copy (count of layouts of database copy (count of layouts of document myDbNum) to myLayoutCount myDocNum) to myLayoutCount set myLayoutFields to {} set myLayoutFields to {} set i to 1 set i to 1 repeat until i > myLayoutCount repeat until i > myLayoutCount get visible of layout i get visible of layout i copy the result to end of copy the result to end of myLayoutFields myLayoutFields set i to i + 1 set i to i + 1 end repeat end repeat myLayoutFields myLayoutFields end tell end tell www.fmpromigrator.com Page 7