75.7 F
Tampa
Tuesday, January 31, 2023
spot_img

Latest Posts

ChatGPT and FileMaker Coding and Integration Opportunities


ChatGPT is dominating online and offline conversations these days. ChatGPT is a chatbot created by a company called OpenAI. But saying it is a chatbot is like saying a Porsche is a car. This particular chatbot has performance and features unlike any other chatbot or AI tool available to the public. As a result, it has generated vast amounts of press, with articles in the NY Times, Wall Street Journal, NPR, and many others. 

Why is ChatGPT a big deal?

It’s like having the most intelligent friend in the world with whom you can ask natural language questions, and they will give you well-written and accurate answers, for the most part. For example, we asked it what snow was, and this was the response:

Chatgpt-filemaker_1

You can immediately see why this is causing such a stir in academic circles. Middle school, high school, and even some college students could abuse this to get out of writing their own essays. Many already have.  

It also has a reputation for being quite good at writing software, and according to, well, itself, it is familiar with a host of programming languages, including Python, JavaScript, C++, etc. But does it know FileMaker? 

Intrigued by the tool, we dove in and asked ChatGPT FileMaker-related questions. For example, could it write a script? We asked it to do a relatively simple task in FileMaker – write a script that will print a report. Here’s what we got:

Chatgpt-filemaker_2

When we prompted it again to do the same thing, we got a slightly different, but still overall correct, response. 

Chatgpt-filemaker_3

The tool even comments the code, which too many human developers neglect to do. However, the comments pertain more to what the code does than why it doing it.

Next, we prompted the tool to code something a little more advanced. We asked it to give us the low and high tide times in Boston every day in 2023. Here’s the script it wrote in response:

Chatgpt-filemaker_4

Notice the code doesn’t provide the values for all of 2023. Instead, it displays the values starting today and continuing for a year after today. Also, it uses a function called “ParseJSON,” which doesn’t exist. We tried another one: 

Chatgpt-filemaker_5

Again, weird errors as there is no Get(TimeZoneAdjustment) function. Still, compelling stuff and, at the very least, something to guide a developer down the right path. 

We also discovered that we would get slightly different responses whenever we asked the same question. For example, this was another result for the Boston tide predictions: 

To calculate the high and low tide in Boston for each day in 2023, we need to use a script that integrates with a tide prediction API. Many different APIs can provide tide prediction data, such as the National Oceanic and Atmospheric Administration (NOAA) API or the World Weather Online API.

 Here is an example of a script that uses the NOAA API to calculate the high and low tide in Boston for each day in 2023:

 # Set up a variable to store the API key

Set Variable [ $apiKey; Value: "your-api-key-here" ]

 

# Set up a loop to run for each day in 2023

Loop

  # Set up variables to store the current date and the date of the next day

  Set Variable [ $currentDate; Value: Get ( CurrentDate ) ]

  Set Variable [ $nextDate; Value: Date ( Month ( $currentDate ) ; Day ( $currentDate ) + 1 ; Year ( $currentDate ) ) ]

 

  # Set up a variable to store the API endpoint URL

  Set Variable [ $endpointURL; Value: "https://tidesandcurrents.noaa.gov/api/datagetter?" &

    "begin_date=" & Year ( $currentDate ) & "-" & Month ( $currentDate ) & "-" & Day ( $currentDate ) &

    "&end_date=" & Year ( $nextDate ) & "-" & Month ( $nextDate ) & "-" & Day ( $nextDate ) &

    "&station=8454000&product=predictions&datum=MLLW&units=english&time_zone=lst_ldt&format=json" ]

 

  # Send a request to the API and store the response in a variable

  Set Variable [ $response; Value: MBS("CURL.Execute"; $endpointURL; "GET"; ""; "Bearer " & $apiKey; "application/json") ]

 

  # Parse the response to extract the high and low tide data

  Set Variable [ $highTide; Value: JSONGetElement ( $response ; "predictions[0].v" ) ]

  Set Variable [ $lowTide; Value: JSONGetElement ( $response ; "predictions[1].v" ) ]

 

  # Add the high and low tide data to the database

  New Record/Request

  Set Field [ YourTable::Date; $currentDate ]

  Set Field [ YourTable::HighTide; $highTide ]

  Set Field [ YourTable::LowTide; $lowTide ]

 

  # Increment the date

  Set Variable [ $currentDate; Value: $nextDate ]

End Loop

This is a much more advanced response. It still needs to understand that we want the results to be for each day in 2023 instead of a year from the current day. But everything else looks like it would work.  

We tried other advanced requests. ChatGPT did a decent job of scripting a Google Calendar integration from FileMaker. In addition, it successfully wrote a script to calculate the first 100 prime numbers, though it’s methodology could have been more efficient.  

An interesting thing to note: the results were often different for the same request but improved with each iteration. We even told ChatGPT it was wrong, and it attempted to correct the error. We accomplished all of this using natural language with a chatbot, not unlike having a conversation with a human being. 

Our Conclusions about ChatGPT and FileMaker

So, do we expect this technology to replace human software developers? The short answer is no. By and large, the results provided a starting point for a solution to a problem. We still need to have a human who is deeply familiar with FileMaker to evaluate and implement the code. Every piece of code ChatGPT delivered had some section that would have to be adjusted for the intended solution. In addition, parts of the code needed to be corrected.  

But most importantly, most FileMaker developers are business consultants first and developers second. We excel at connecting with our clients, understanding the nuances of their business problems, and translating those requests into usable applications. ChatGPT may be able to do many things, but it can’t do that yet!

Nonetheless, this is a potentially powerful new resource for developers to use. At the very least, it can be a place to brainstorm ideas, ask questions and get responses that we can tweak to suit our needs. 

At the most basic level, we can use it as it was ostensibly intended, as a chatbot, integrated with a FileMaker solution, and set up to interact with the data in that system in a natural language way. 

We will continue exploring other fascinating ways to integrate ChatGPT with FileMaker solutions. Stay tuned!

Keep me posted



Latest Posts

spot_imgspot_img

Don't Miss

[tdn_block_newsletter_subscribe title_text="Stay in touch" description="VG8gYmUgdXBkYXRlZCB3aXRoIGFsbCB0aGUgbGF0ZXN0IG5ld3MsIG9mZmVycyBhbmQgc3BlY2lhbCBhbm5vdW5jZW1lbnRzLg==" input_placeholder="Email address" tds_newsletter2-image="5" tds_newsletter2-image_bg_color="#c3ecff" tds_newsletter3-input_bar_display="row" tds_newsletter4-image="6" tds_newsletter4-image_bg_color="#fffbcf" tds_newsletter4-btn_bg_color="#f3b700" tds_newsletter4-check_accent="#f3b700" tds_newsletter5-tdicon="tdc-font-fa tdc-font-fa-envelope-o" tds_newsletter5-btn_bg_color="#000000" tds_newsletter5-btn_bg_color_hover="#4db2ec" tds_newsletter5-check_accent="#000000" tds_newsletter6-input_bar_display="row" tds_newsletter6-btn_bg_color="#da1414" tds_newsletter6-check_accent="#da1414" tds_newsletter7-image="7" tds_newsletter7-btn_bg_color="#1c69ad" tds_newsletter7-check_accent="#1c69ad" tds_newsletter7-f_title_font_size="20" tds_newsletter7-f_title_font_line_height="28px" tds_newsletter8-input_bar_display="row" tds_newsletter8-btn_bg_color="#00649e" tds_newsletter8-btn_bg_color_hover="#21709e" tds_newsletter8-check_accent="#00649e" embedded_form_code="JTNDIS0tJTIwQmVnaW4lMjBNYWlsQ2hpbXAlMjBTaWdudXAlMjBGb3JtJTIwLS0lM0UlMEElMEElM0Nmb3JtJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZ0YWdkaXYudXMxNi5saXN0LW1hbmFnZS5jb20lMkZzdWJzY3JpYmUlMkZwb3N0JTNGdSUzRDZlYmQzMWU5NGNjYzVhZGRkYmZhZGFhNTUlMjZhbXAlM0JpZCUzRGVkODQwMzZmNGMlMjIlMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwaWQlM0QlMjJtYy1lbWJlZGRlZC1zdWJzY3JpYmUtZm9ybSUyMiUyMG5hbWUlM0QlMjJtYy1lbWJlZGRlZC1zdWJzY3JpYmUtZm9ybSUyMiUyMGNsYXNzJTNEJTIydmFsaWRhdGUlMjIlMjB0YXJnZXQlM0QlMjJfYmxhbmslMjIlMjBub3ZhbGlkYXRlJTNFJTNDJTJGZm9ybSUzRSUwQSUwQSUzQyEtLUVuZCUyMG1jX2VtYmVkX3NpZ251cC0tJTNF" descr_space="eyJhbGwiOiIxNSIsImxhbmRzY2FwZSI6IjE1In0=" tds_newsletter="tds_newsletter3" tds_newsletter3-all_border_width="0" btn_text="Sign up" tds_newsletter3-btn_bg_color="#ea1717" tds_newsletter3-btn_bg_color_hover="#000000" tds_newsletter3-btn_border_size="0" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjAiLCJiYWNrZ3JvdW5kLWNvbG9yIjoiI2E3ZTBlNSIsImRpc3BsYXkiOiIifSwicG9ydHJhaXQiOnsiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdF9tYXhfd2lkdGgiOjEwMTgsInBvcnRyYWl0X21pbl93aWR0aCI6NzY4fQ==" tds_newsletter3-input_border_size="0" tds_newsletter3-f_title_font_family="445" tds_newsletter3-f_title_font_transform="uppercase" tds_newsletter3-f_descr_font_family="394" tds_newsletter3-f_descr_font_size="eyJhbGwiOiIxMiIsInBvcnRyYWl0IjoiMTEifQ==" tds_newsletter3-f_descr_font_line_height="eyJhbGwiOiIxLjYiLCJwb3J0cmFpdCI6IjEuNCJ9" tds_newsletter3-title_color="#000000" tds_newsletter3-description_color="#000000" tds_newsletter3-f_title_font_weight="600" tds_newsletter3-f_title_font_size="eyJhbGwiOiIyMCIsImxhbmRzY2FwZSI6IjE4IiwicG9ydHJhaXQiOiIxNiJ9" tds_newsletter3-f_input_font_family="394" tds_newsletter3-f_btn_font_family="" tds_newsletter3-f_btn_font_transform="uppercase" tds_newsletter3-f_title_font_line_height="1" title_space="eyJsYW5kc2NhcGUiOiIxMCJ9"]