Accelerating FileMaker Development with AI Code Builders

Accelerating FileMaker Development with AI Code Builders

In this post, we’ll explore how AI code builders—specifically ChatGPT Code Copilot—can help you create custom JavaScript widgets for FileMaker. We’ll walk through an example of building a signature pad, discuss best practices for prompting AI, and touch on some ethical and legal considerations involved in using AI-generated code.

Why Use an AI Code Builder?

AI code builders (e.g., ChatGPT Code Copilot, GitHub Copilot, etc.) leverage machine learning models trained on large amounts of programming data. They can assist developers by

  • Generating boilerplate or starter code automatically

  • Suggesting functions and syntax in real time

  • Speeding up iteration on front-end features like HTML, CSS, and JavaScript

AI Code builders allow you to build a widget or page without knowing ANY programming languages.

When used correctly, these tools can save hours of coding and debugging—especially for tasks that don’t necessarily require advanced, custom logic.

Key Considerations – Ethics, Legality, and Privacy

  1. Ethical Impact
    AI-driven tools can automate mid-level coding tasks, potentially affecting developer job roles. While it streamlines certain work, the long-term impact on developer careers is worth watching.

  2. Legal Concerns
    AI generators may source snippets of copyrighted code. While current U.S. legal direction makes direct infringement cases unlikely, it’s prudent to remain cautious about where the code originates.

  3. Privacy
    Anything you share with an AI tool could be integrated into its broader dataset. Never upload confidential information or proprietary code without anonymizing or removing sensitive details.

Best Practices When Prompting ChatGPT

Through trial and error, the webinar revealed a handful of tips to get the best results from AI code builders

  1. Craft a Strong Initial Prompt

    • Be specific about what you want, from the programming language to the functionalities and layout.

    • Bad Example – “Build me a signature pad using Javascript, CSS and HTML with Clear, Undo, Save and Cancel buttons.”

    • Good Example – “Build me a signature pad using HTML, CSS and Javascript. The page should include a header titled "Sign Below" a signing canvas and buttons below the canvas.

The buttons will be the following

Clear – Completely removes all drawings from the canvas

Undo – removes the most recent drawing from the canvas

Submit – Saves the canvas to a .png image and stores it as base64 text. It then should run the function FileMaker.PerformScript("SaveSignature" ; base64code of image);

Cancel – Runs the function FileMaker.PerformScript("CancelSignature" ; "" )

The buttons should have a black background with white writing. They should be on the same row and ordered from left to right Clear, Undo, Submit, Cancel. 

The Clear and Undo buttons should be grouped on the left side of the screen and the Submit and Cancel buttons should be grouped on the right side of the screen.

The background for the page and for the signature pad should be white.

Build me the code for this page in 3 separate files index.html, style.css, script.js“

  1. Provide Existing Code Snippets

    • If you’re modifying existing code, paste that code into ChatGPT’s prompt.

    • AI often “forgets” prior context or overwrites essential lines if you ask it to regenerate the entire codebase.

  2. Make Incremental Requests

    • After generating an initial version, ask for changes in small, specific steps (e.g., “reduce the button size,” “add rounded corners,” or “change the header’s font size”).

    • Requesting many modifications at once can confuse the AI and lead to broken or incomplete solutions.

  3. Ask for Only the Changes

    • Rather than asking for the entire file again, say “Please provide only the lines that need to be updated or added.”

    • This preserves previously working code and reduces the likelihood of accidental regressions.

  4. Avoid Complex Multi-tasking

    • AI code builders can lose track of context during multi-part tasks. Break them down into small, separate requests.

Step-by-Step Example – Building a Signature Pad in FileMaker

Goal – Create a signature pad that captures a user’s drawing, supports undo/clear, and saves the result as a base64-encoded image inside FileMaker.

  1. Outline Requirements

    • HTML – A simple layout with a canvas, header, and four buttons (Clear, Undo, Submit, Cancel).

    • CSS – Basic styling (button size, background color, alignment).

    • JavaScript – Canvas drawing logic (capturing strokes, undo/redo stacks), plus two FileMaker script calls

      • FileMaker.PerformScript("Save Signature", base64Code)

      • FileMaker.PerformScript("Cancel Signature")

  2. Create a Detailed Prompt
    In ChatGPT, specify –
    “Build me a signature pad using HTML, CSS, and JavaScript, including a header titled ‘Sign Below,’ a canvas, and four buttons. The ‘Submit’ button should encode the canvas as base64 and call FileMaker.PerformScript("Save Signature", <base64>), etc.”

  3. Generate Files
    ChatGPT returns – index.html (or combined HTML file)

    • style.css (for layout and styling)

    • script.js (draw logic and button handlers)

  4. Refine & Test

    • If the AI lumps HTML/CSS/JS together, ask for separate files or placeholders for easy inclusion in FileMaker fields.

    • Test your initial code locally (e.g., open the HTML in a browser). Check if Undo/Clear works and if Submit/Cancel behave as expected.

  5. Integrate Into FileMaker

    • Store the HTML, CSS, and JS in FileMaker fields.

    • Use a calculation field or a “web viewer” that substitutes in the CSS/JS code.

    • Ensure “Allow interaction” and “Allow JavaScript to perform FileMaker scripts” are enabled in the web viewer settings.

  6. Add Final Touches

    • Prompt ChatGPT for style updates (e.g., “Make the header smaller and unbold it,” “Group the Clear and Undo buttons on the left,” etc.).

    • Manually adjust any margins or design elements if ChatGPT’s output isn’t pixel-perfect.

Result: A working signature pad that you can open in FileMaker, draw on, and automatically store the output as a base64-encoded image—perfect for e-signatures or doodles.

Beyond Signatures – A Time-Tracking Example

The webinar also showcased a more advanced JavaScript widget – a time-tracking dashboard built entirely via AI-assisted code, then dropped into FileMaker. It features

  • Dynamic plus and delete buttons for line items

  • Light and dark modes

  • Start and Stop Timers

  • The entire front-end (HTML, CSS, JS) generated by ChatGPT with minimal manual intervention

This advanced use case illustrates how quickly you can evolve from small widgets (like a signature pad) to more complex applications—increasing interactivity and user experience within FileMaker, all powered by AI-generated front-end code.

Closing Thoughts

AI tools like ChatGPT can drastically reduce development time and open doors to front-end interactions you might not otherwise build by hand. The key is prompt engineering—learning how to give precise instructions and incremental feedback.

Remember

  • Always keep ethical, legal, and privacy considerations in mind.

  • Triple-check AI-generated code for security issues and correctness.

  • Use a “rinse and repeat” process – prompt, refine, test, and integrate.

By leveraging these best practices, you’ll be well on your way to creating powerful, user-friendly JavaScript widgets that enhance FileMaker’s functionality—without having to become a front-end development expert.

Further Resources

Have questions or want to share your own AI-generated FileMaker widget? Drop a comment or reach out to continue the conversation. Happy coding!



CT FileMaker Developer Group – System Notifications with FMP 2024

8/21/2024 – This month, Robert Naud will take a look at a feature which, although first introduced for FileMaker Go, FileMaker 2024 now makes available to FileMaker Pro. We’re talking about system notifications! Even though we’ve managed to do without them for a long time, they offer us interesting opportunities to interact with the users of our applications. We look forward to seeing you there!

 

CT FileMaker Developer Group – What’s New in FileMaker 2024?

7/17/2024 – This month, Douglas Wallis, Product Manager at Claris, will be joining us to present the new features included in the recent release of FileMaker 2024. In addition, Steven Blackwell will be showing the group a couple major security issues that the FileMaker 2024 release has resolved.

 

CT FileMaker Developer Group – AI in FileMaker

5/29/2024 – This month, we will be discussing the topic of AI in FileMaker. Please come prepared to discuss your experience with AI in FileMaker and to present any AI integrations you may have come up with.

 

CT FileMaker Developer Group – Engage Presentations Recap & Discussion

4/24/2024 – This month, we will be recapping and discussing our favorite Claris Engage presentations. Please come prepared to discuss the presentations you found most interesting and enlightening.

 

CT FileMaker Developer Group – Webmin Server GUI Tool

4/19/2023 – This month, Oliver Reid will be presenting the Webmin GUI tool for Claris Server on Linux. Webmin provides all tools needed managing a Claris (or FileMaker) Linux server. Those who have becomes used to a Mac or Windows GUI will find Webmin as easy, if not easier, to use to upload, download and organize files for a Claris Server, set up OS level cron jobs, set ownership and permission for files and folders, and install ODBC drivers to support ESS, and more.

 

CT FileMaker Developer Group – KyoSync II & Engage Recap

3/27/2024 – This month, John Mathewson of Kyo Logic will be sharing KyoSync II, which was unveiled at Claris Engage. John will relate how his team reliably syncs two FileMaker systems, even when one server is remote and has limited access. You’ll also get an inside look at KyoSync II, the technology that made this all possible.

In addition, we will also be reviewing Claris Engage and discussing the new ideas and trends that came out of the event.

 

CT FileMaker Developer Group – Admin API Server Monitoring

9/20/2023 – This month, Robert Naud we will take us through an Admin Api demo file published by Soliant, and discuss possible use cases and customization ideas. We will also discuss some things to know about the API itself, especially concerning the authentication, and will look at the available documentation. Meet with us and add yet another tool to your toolbox!

 

CT FileMaker Developer Group – MongoDB

1/18/2023 – This month, Oliver Reid will be giving his critically acclaimed “Low Cognitive Load” presentation of MongoDB. Its purpose is to provide an overview of how MongoDB works, which is informative while not diving too far into technical details. As always, please feel free to come with any topics that you would like to discuss or present.

 

CT FileMaker Developer Group – Linux Setup and Hosting Option Discussions

12/7/2022 – This month, we will be discussing how to set up a Linux Server for FileMaker and what options are out there for Cloud Hosting. As always, please feel free to come with any topics that you would like to discuss or present.