Tim Dietrich

Custom Software Developer

Home Services Portfolio Blog About Contact Newsletter

FileMaker: Using "Perform Script on Server" to Sort Records on the Client

A FileMaker user from New Brunswick, Canada asked:

Can “Perform Script on Server” be used to speed up the process of sorting records from a client running a file hosted on Server v13?

My response:

Not really - at least not in the way that I think you’re asking about.

When you call a script on the server using Perform Script on Server (or "PSoS" as we sometimes refer to it), and that script does something that involves a found set (performs a find, sorts records, etc), then those operations are only affecting the server’s temporary found set. The changes will not be reflected in the found set of the client that initiated the remote script.

You can use PSoS to call a script, which can perform a calculation using the ExecuteSQL function to query the database using a SQL SELECT statement, and return the results in a sorted order (using an ORDER BY clause). However, that will not change the found set of records on the client. You would need to take the result returned by PSoS and do something with it - such as “unpack" it into a set of records.