Forum Discussion

DylanMoring's avatar
DylanMoring
Qrew Trainee
5 months ago

Custom GPT: Quickbase Formula Builder - Version of ChatGPT Optimized for Writing QuickBase Formulas

[Link to Quickbase Formula Builder Custom GPT]

I've been using ChatGPT a lot this year, and have found it especially useful for writing simple code, typically in Python. I've attempted to use it for writing Quickbase formulas too, but it never got it quite right.

A couple months ago, OpenAI released the "Custom GPT" feature for ChatGPT. This allows people to create custom chatbots designed to perform specific tasks by providing instructions and reference information.

I had some free time at work, so I decided to attempt to make a Custom GPT that actually can write formulas for Quickbase. I provided some basic information on required syntax as well as a list of all of the built-functions.

The result actually seems to work pretty well!

I asked it to write a formula that calculates Sales Tax using a couple different rules, and this is what it wrote:

var number taxRate = Case([State], 
    "State1", 0.07,   // Replace "State1", "State2", etc., with actual state names and their respective tax rates
    "State2", 0.08, 
    // ... add more states and their rates here
    0); // Default tax rate if state is not listed

var number tax = If([Customer Type] = "General" or [Customer Type] = "Subsidized", 
    [Subtotal] * $taxRate, 
    0);

var number adjustedTax = If([Customer Type] = "Subsidized", 
    $tax / Sqrt(ToNumber([Customer Tenure])), 
    $tax);

$adjustedTax;



This is a work-in-progress, but I wanted to share what I made in case it is useful to anyone else.

[Link to Quickbase Formula Builder Custom GPT]

You do need a ChatGPT Plus subscription to use this, unfortunately. If you are already subscribed, I'd love you to give this a try and let me know how it works for you. If you aren't, keep in mind that this is a work-in-progress, so I don't recommend getting a subscription just for this tool.

When writing requests, it's helpful to do the following:

  • State the name of the field you are creating
  • Describe in plain English what you want the calculation to do
  • Mention the exact column names used on your table



------------------------------
Dylan Moring
------------------------------

4 Replies

  • just some feedback after using. The GPT keeps using "isEmpty" in place of "inNull" when generating my requests. could be unique to me. will you be maintaining this GPT and retraining it?

  • Awesome

    Did you do any training on the model for this?



    ------------------------------
    Prashant Maheshwari
    ------------------------------
    • DylanMoring's avatar
      DylanMoring
      Qrew Trainee

      I didn't do any training, per se, since that's only possible through the API at the moment, but I did develop an instruction prompt with rules and guidelines for the model to follow, as well as a list of all of the functions available for it to use.

      GPT-4 is very good at performing these kinds of tasks without specific training, as long as it is instructed properly.



      ------------------------------
      Dylan Moring
      ------------------------------
      • PrashantMaheshw's avatar
        PrashantMaheshw
        Qrew Captain

        I don't mind exploring this together if you have time to hop on to Zoom. 

        Or maybe you can train it to avoid python function which it suggests a lot . For example I asked it to generate random number which is not a feature. 

        To generate a random number between 1 and 100 in Quickbase, you can use the Rand() function, which generates a random decimal number between 0 and 1. To scale this to the desired range of 1 to 100, you multiply the result by 99 (the range of numbers you want, which is 100 - 1), then add 1 to shift the range from 0-99 to 1-100. Finally, you should use the Int() function to convert the resulting decimal number to an integer.



        ------------------------------
        Prashant Maheshwari
        ------------------------------