1 Reply Latest reply on Jan 19, 2015 9:26 AM by philmodjunk

    FileMaker script steps combined with SQL



      FileMaker script steps combined with SQL


       I am aware of ExecuteSQL for fetch rows from database. But I want to know if there are any FileMaker script steps combined with SQL by which we can fetch data from DB table without using SQL query.

        • 1. Re: FileMaker script steps combined with SQL

          What you post seems a contradiction of terms. You want to combine script steps with SQL, but you want to fetch data without using SQL...??

          I can suggest two approaches, guessing that one of these is what you had in mind:

          In FileMaker, a script can perform a find to pull up a found set of records. See this thread for a number of different examples all in one thread: Scripted Find Examples

          But since you do mention using SQL, here's a method that I use that can, when querying unindexed fields in a table with a lot of data, proved faster than a scripted find:

          Set a field to the results of an ExecuteSQL query. The query is designed to produce a return delimited list of Primary Keys. The field thus set by my script is setup as a match field in a relationship to the table of records from which I queried these values. Then the script step Go To Related Records works to pull up the full set of related records. (A portal would also serve to list the same records and then no script would be needed if the match field were defined as a calculation field using ExecuteSQL()).

          But maybe you had something else in mind when you say "fetch data"?