One script to manage a process
9 days ago • 1 min readOne of the most common script patterns that I use is when I have a process with a number of actions. In many cases this is a script to manage a particular entity. So actions can be any of Open, Add, Edit, Save, Cancel and Exit. Each action will perform a discrete series of script steps. For example, the Open action may open the current record in a card window; the Add action may open the same card window and create a new record. This pattern means that all buttons associated with the process...
READ POSTLoop, but just once.
10 days ago • 4 min readA loop is a standard structure in programming. It is designed to process a block of code a number of times until a condition says to stop. A loop has three essential parts: a starting point, the code to repeat and an exit condition. A loop may work through a set of records, a set of fields in a record, or a block of text such as JSON. It may also be used to retry an operation, build a list, or check a condition until it becomes true. try/catch Another programming structure available in many...
READ POSTAre your FileMaker scripts idempotent?
11 days ago • 4 min readIdempotency? Eedemwhat? Huh? Never heard of it? It is pronounced either ee-dem-po-ten-see or id-em-po-ten-see. Any process is idempotent if applying it multiple times has the same effect as applying it once. In real life, an example is pressing the button to cross at a pedestrian crossing. When someone presses the button, it registers a crossing request. The pedestrian walk indicator is added into the light changing schedule. If someone across the road also presses the button, there is no...
READ POSTAre you using a supported client version?
14 days ago • 4 min readEach major release of FileMaker Pro brings new features. These features necessarily include new script steps and new functions. Importantly, existing script steps and functions are often also updated. New versions and new features present an issue for FileMaker developers. If we choose to use the new features, we need to make sure that the user is accessing our solution with the right version of the FileMaker client. In most cases, the solution will be hosted, so we also need to ensure that...
READ POSTDebugging Scripts with Assertions – Access Control
15 days ago • 4 min readOver the last couple of days we have come to understand assertion and have created a script that we can call when we want to assert. This requires just one line in our calling script – Perform Script specifying a JSON parameter with two elements, condition and message. Required control Today's challenge is controlling when assertions run. Assertions are a developer tool, not part of normal application behaviour. We need a way to control when they run. On one hand, we can specify that the...
READ POSTDebugging Scripts with Assertions
17 days ago • 2 min readAssertions are a debugging technique that helps the developer detect incorrect assumptions as soon as they occur, rather than hundreds of lines later when something finally fails. An assertion can be a simple check to confirm if a condition is true. Simple assertions can be used to verify input values, output results, or current states. An assertion says: “At this point in the script, I expect this condition to be true.” If it isn’t, something has gone wrong. When an assertion fails, the...
READ POSTTeaching card windows new tricks
18 days ago • 3 min readPractically every new release of FileMaker has that one amazing new feature. Back in May 2017 when FileMaker 16 was released, my favourite new feature was the card window. Card windows A card window is a clean window that is attached to the parent window from which it was created. It has none of the chrome that displays at the top of normal windows – title bar, status toolbar and editing bar. There may be a close button at the top left but this can also be removed. A card window is modal,...
READ POST