Article Tags

Click or tap one of the article tags to filter down to a smaller selection.

Show all content

Videos about "json"

15 videos found.
JSON Parameter Passing 02/12/2024 - 5:57pm

Thank goodness JSON was implemented within FileMaker. Without it, we would still be using a variety of other methods for handling multiple parameters within a FileMaker script. Using JSON, we now get the double-sided benefit of 1) having an efficient serialization of key/value pairs as inbound parameters and 2) it just happens to be the standard which most of the rest of world is using for a large chunk of how things interoperate.

In this video, and the technique file, I'll showcase a few examples of how you can receive and work with inbound parameters when using JSON as the method for handling them. We discuss script results, clean-reading code and the final example provides a very useful custom function for the auto-instantiation of JSON-based script parameters into their FileMaker scripting counterparts.

Using the provided JSONVariables custom function is a great alternative to individually parsing all of the inbound parameters. It doesn't replace the need to initially declare your variables, but it does provide the opportunity to have cleaner reading self-documenting code. If you've not used JSON for handling your parameters before, then you should start right now and use this video and file as guidance!

JSON Manipulation using JSONata 01/02/2024 - 3:22pm

Having created recent videos about accessing APIs via REST, and extracting the free JSON data as well, it would be a glaring omission if I didn't address our need to manipulate the JSON FileMaker provides us with. Yes, the work to put your FileMaker data into structured JSON has already been done. But, the JSON you need for your designated API is always going to be different than that.

Fortunately, we have access to the amazingly powerful and fast JavaScript engine built into each and every Web Viewer. What we need to capitalize on are the free open source libraries which help us get the results we need.

JSONata is a long standing powerhouse when it comes to manipulating JSON within JavaScript. Updates as recently as two years ago, to the eight year old library, moved it from a more linear synchronous model to an async model. This means we need to learn a bit about JavaScript promises and how we can use JSONata's own tools to easily manipulate our FileMaker JSON into what's needed. This video and the associated technique file will provide you with the tools which will help accomplish the integrations you're trying to solve.

Easy JSON Record Data 11/14/2023 - 12:05pm

Coding software solutions offers the fascinating realization that there are always multiple pathways to achieve the same goal. Sometimes the methods we're familiar with may not be the most optimal, prompting us to expand our knowledge to explore alternative approaches.

This video explores precisely that theme - the comparison between older and newer methods of accomplishing the same task. The advantage lies in the fact that newer methods often come with additional features or benefits. This is particularly true when it comes to obtaining the current record data as a JSON object. Historically, we've relied on ExecuteSQL to extract field names and values from the current record or a set of records.

In this video, I delve into the existing options using ExecuteSQL for creating a JSON object of the current record data. This method is effective in various scenarios. However, accessing related data can be time-consuming, especially when constructing SQL joins accurately requires significant mental effort. Unless you're a SQL expert, this may not be the most efficient use of your development time. Fortunately, recent versions of FileMaker have streamlined the process, making it exceptionally easy, with an alternative method, to extract any data from any record and convert it into the precise JSON object needed for passing parameters or interacting with external APIs.

Virtual List JSON Portal Filtering 02/10/2023 - 11:58am

Developing software in FileMaker can be such a joy when you're able to solve so many problems so quickly. There is, however, a point where you start to solve so many problems that your solution starts to slow down and you find yourself wondering why.

Most commonly, it's the result of cumulative features compounding to make your solution slower and slower. Without careful consideration of the user interface, and how features are presented, it's easy to create a solution which starts to lag over time.

In this video, I show how portal filters really work and how to address the issue of a portal used for a very simple selection process. In most cases, your portal is only going to show a fraction of the number of fields found in its table. To this end, you must learn how to replicate the native portal filtering feature. Filtering with JavaScript/JSON is one of the most powerful ways to present data in both an efficient and faster way.

Finding your FileMaker solution is feeling slower as time goes by? You need the content covered in this video!

Learning JavaScript in FileMaker 03/10/2022 - 7:00am

Some developers who start with FileMaker never extend beyond it. Hopefully, that's not you. Or, at least you're willing to look into learning some other languages and see how they can benefit your FileMaker solutions!

In FileMaker 19 we gained both a new script step named "Perform JavaScript in Web Viewer" and a JavaScript function embedded into the Web Viewer named "FileMaker.PerformScript()". If you haven't taken the time to investigate how these new features work, then allow me to give you the gentle push into taking advantage of them.

While formerly we could use a plug-in to directly execute JavaScript, and there were some "hackish" workarounds to using the JavaScript within Web Viewers, we now have a totally native way to take advantage of this very powerful technology. Understanding how things work, and what you can do, will expand your development capabilities. I highly suggest you take a serious look at learning a bit of JavaScript and the cool thing is you can do it right within a FileMaker file!

Validating JSON for Scripts 12/10/2020 - 8:00am

Using JSON for passing multiple parameters can be a real life saver. Because JSON keeps all individual parameters separate from each other, you can pass pretty much any type of data except for container data - although you can pass a reference to a container easily enough. Your parameters can also have as many levels as necessary and the JSON can easily be modified as it moves from script to script.

When writing a complex and large collection of scripts, you eventually hit errors and issues. You end up spending extra time hunting down problems and eventually you find out it's a simple issue where you just "forgot" to include that one additional item the script needed in order to handle the process properly.

This is where validation comes into play. It's a perfect solution for making sure your scripts work the way you expect them to. Rather than letting the script fail, then determining whether it really did fail or not, you're telling the script it MUST fail unless it has all the required parts.

Thus, a single script, with a multi-dimensional JSON validator is a wonderful tool to have for your complex scripting situations. In the associated video and technique file, you'll find a complex script which will save hours and hours of time by validating your JSON data before the script even tries to use it.

Detecting Data Changes 10/13/2020 - 8:00am

Here's an interesting dilemma. How do you track when specific fields are modified and adjust your JSON object so it only includes the data which was modified? Or, how about knowing when a user has modified specific fields, then having the user interface direct them down a different path than if they had modified others?

In both situations, you simply need to know when a field was modified. Using the Get ( RecordModificationCount ) function we can know THAT a given record was modified and using a modification field we can know WHEN it last happened. What we don't know is when only a specific set of fields is modified. We also may need to know exactly which fields were modified in order to take some type of action. This is where Detecting Data Changes is quite helpful. There are a number of ways this can be accomplished and the solution, as always, depends on what your needs are.

In this video, I showcase a method I use to detect data changes and then generate a JSON object based on specific fields which were changed. If you find your solution needing to work with an external API or needing to simply know when certain fields have been changed then you're sure to find some valuable info within this video and technique file.

Scripting - JSON Data Writer 10/01/2020 - 5:21pm

While working on a solution which made heavy use of an online API for REST based communication, the solution slowly revealed it had a large number of "specially dedicated" data processing scripts. Many of these scripts were quite normal in the realm of "I have some data, I want to put it into the right place." You know, your typical Go To Layout then Set Field script steps.

The issue, however, was that most all of them did somewhat they same thing - a lot of code duplication. They either put the data into a field on some layout or they moved it into a global variable.

For myself, while developing within any solution, I always try to see where efficiency can be improved and implement as needed. The result of some recent efforts was creating a generalized data writer for JSON based data. It turns out that this solution is quite efficient and allows you to not only reduce your total number of solution scripts, but also makes it quite convenient to provide instructions about where data needs to be stored.

If you enjoy optimizing your solution's method of handling data, then it's very likely you'll benefit from a number of the valuable lessons within this comprehensive video about a JSON Data Writer script.

Collecting Data (arrays & lists) 11/06/2019 - 1:08pm

Your FileMaker database is obviously designed to store data. FileMaker also provides the tools for precisely extracting that data as needed. When and how you extract the data is based on your needs. Sometimes, you need the data for an external system or API. Maybe it's needed for an export or you need the data specifically for a given visualization of that data.

In a recent video, I showed some Sankey Diagrams and how cool they are as visualization tools. One of keys to presenting a great visualization is being able to extract the data you need to present. This data may also change as the user navigates through the chart or your user interface.

So, in short, we need to be familiar with all the various ways in which we can collect our data out of the database. Fortunately, there is a somewhat small collection of methods, but knowing how each of them work and when you might use one over the other is a matter of experience and practice. In this video, I cover the possible variations and you get to choose which method you want to use and when. The ultimate method is something you'll find towards the end of the video.

Advanced JSON Script Parameters 01/18/2019 - 12:57am

While many FileMaker solutions will manage multiple parameter passing in very simple and straight-forward ways, there are some solutions which you know will grow over time. Because of this expected growth, you may want to have an additional level of comfort knowing you've implemented a very strict system for managing data transfer between scripts.

You also may be interested in working with external APIs and connecting to systems and data which is provided via the currently popular format of JSON (JavaScript Object Notation).

Since the release of FileMaker 16, we've had access to the fundamental JSON* functions. With their initial release, there were a number of developers who immediately jumped on the bandwagon. Since FileMaker 16 was released, we've had a good bit of time to codify some methods and helpful custom functions for working with JSON formatted data.

This video is all about providing comprehensive initial coverage about how JSON can be used for passing multiple parameters within FileMaker. If you never quite taken the plunge into using JSON for parameter passing then this video and the associated file may very well provide you with the incentive to take a more serious look. At the very least, you'll know what's going on when other developers mention they're using JSON parameters!

Pages