profile

ScriptLogic

Create better FileMaker scripts by giving me a few minutes every day thinking about techniques and deepening your understanding.

Subscribe to receive every post as soon as it’s released…

When you should NOT use PSOS

We have looked a bit at PSOS and examples where it can produce better results than running a script locally. Now let’s shift on to cases where you should probably not use PSOS. Beware the unsupported script step You may already know this but not every script step is supported on every FileMaker client. Even for FileMaker Pro there are some unsupported script steps - most notably those for mobile devices. With any script step it may also be partially compatible. For example, there is an option...
READ POST

When to use PSOS (cont.)

Yesterday we looked at a typical use for PSOS: moving a process that works with many records to the server. This can reduce network traffic between the client and host, and it may make a long-running process feel more responsive for the user. The actual performance gain depends on the process and the server’s workload. Today we will consider a few other good uses for PSOS. Delete a large batch of records Clearing a temporary table before starting or continuing a process is another common...
READ POST

When to use PSOS

Today we continue our discussion of PSOS by considering when it would be advantageous to use it over performing the script on the client. PSOS is better when… PSOS is usually better when a script touches a lot of data. FileMaker is a distributed database platform – the client (FileMaker Pro or FileMaker Go) has its own database engine. These FileMaker clients do most of the work themselves. This means that the server needs to send the records to the clients to process. The major thing to...
READ POST

The PSOS script step

Today let's have a look at the PSOS (Perform Script on Server) script step introduced yesterday and the options it provides. Specify script The script that PSOS will run on the server can be specified in the same way as the standard Perform Script script step: From list – select a script from a list of available scripts By name – specify the script name with a calculation In both cases, the script can either be from the same file or from another file set up as a FileMaker Data Source. When...
READ POST

PSOS for the uninitiated

This week we're going to dive into a script step known as PSOS. If you know what PSOS is, then you've probably used it and are somewhat familiar. If you don't even know how to pronounce PSOS ("pee-soss"), then read on. Not one but two In fact there are two PSOS script steps: Perform Script on Server Perform Script on Server with Callback Both steps have similar setup, requirements and workings. We will start with the standard PSOS and finish with the differences in PSOS with callback. What is...
READ POST

Script patterns – Test then act (final assessment)

Let's follow on from yesterday and complete the assessment of the four script solutions. Extensible For these solutions the extensibility would refer to being able to add another FileMaker client, such as distinguishing between Mac and Windows for FileMaker Pro. Extensibility may also be adding script steps such as Show all records or Sort Records for specific clients. Scripts #1 and #3 are rated highly because each client is clearly defined. Script steps can be duplicated and the...
READ POST

Script patterns – Test then act (assessment)

Over the last two days, we have detailed four scripts to solve the problem proposed – test for the FileMaker client being used, and navigate to a specific layout designed for the client. Now it is time to compare and contrast these solutions and come up with a final selection. The four solutions are: #1: Use standard If/Else If #2: Test client and go to layout by calculation #3: Run a subscript for layout navigation #4: Use a layout routing table When assessing each solution, I will refer to...
READ POST

Script patterns – Test then act (cont.)

Yesterday we detailed two scripts that would solve the problem presented – test for the FileMaker client being used, and navigate to a specific layout designed for the client. Today we will try to find other ways to solve the problem. When working through alternate solutions we must bear in mind that there are no wrong answers — just solutions of variable quality and fit. #3: Run a subscript for layout navigation This solution aims to put all the layout navigation code into a script that is...
READ POST

Script patterns – Test then act

There are many times you need to test a condition and return different outcomes based on the result. In many of these, the condition results are exclusive — only one can be true. Go to layout by FileMaker client Let's consider a simple example where you are testing for the FileMaker client being used. We will navigate to a specific layout designed for the client. The clients tested and layout targets are as follows: FileMaker Pro: go to layout "Pro" FileMaker Go: go to layout "Go" FileMaker...
READ POST