Knowledge Base

Commenting Formulas | BEGINNER

Picture a scenario in your company where you set up a complex formula field, with lots of If() statements, steps and calculations that made sense at the time, but have forgotten since. While formulas can be an incredibly powerful tool for you and your business, they can very quickly become messy and disorganized to where they’re unmanageable. To help reduce the impact of the above scenarios, you can easily add comments to add your own personal touch and guide for the future as you set up formulas.

Commenting your formulas is very simple – a couple examples of where they fit in are:

✓ Entering an explanation of each step of a complicated formula/process

✓ Commenting out an old formula or prior version for reference/history or to revert back to if needed

✓ Adding comments/notes for yourself or a future admin to be able to review and understand

✓ Comment out different formulas to test out different results without having to set up multiple fields or re-write your formula every time

Commenting out formulas turns out to be as simple as adding // before any line in your formula. For example:

//Hello! I'm commenting!and
If( [Grade] > 80, "Pass", "Fail") 

Commenting out formulas turns out to be as simple as adding // before any line in your formula. For example:

//Hello! I'm commenting!and If( [Grade] > 80, "Pass", "Fail")

In this example, the formula only looks at the second line with the If() statement. The first line that says “Hello! I’m commenting!” isn’t interpreted or shown, because it has the // in front of it

Let’s take another example, this time using comments to outline a procedure where we have several different things going on to make it clear whats happening at each step:


//Step 1 - If PO is closed via Quick Base automation 1234 or came from the Legacy System, return "Closed"

     [PO Auto Closure]=true or [Legacy PO], "CLOSED",

//Step 2 - If PO is out of funding, meaning the total funds - total invoiced, return "Exhausted"

    [Remaining Funding]<=0, "EXHAUSTED",

//Step 3 - If PO has been issued to a contractor and still has funds (not Exhausted) - return "Issued"

    [Issued to Contractor], "ISSUED",

//Else - if none of the above are true, return "New" as this PO is new in the system


From the above – if you come back at a later date, or don’t remember what the field names all mean, you can read this and know step by step what’s supposed to happen without having to dig into each field. You can see here too that you can have multiple comments at any point, as long as each starts with //

Comments are also a great way to collaborate if you have multiple admins working in your system. Let’s say you have a formula that is under development, and you want to note who they should contact if they need to update. You could write something like this:

//For Questions about this formula, please reach out to Chayce Duncan

//Email []( for quickest responses 

Quick Base makes it really easy to make additions and changes as fast as your business needs it to. Because of that, it’s also important to make sure that you’re keeping yourself organized with methods like commenting formulas to be able to look back on and know whats going on.

As a follow up to this – another great tool with formulas is using Variables to eliminate having to repeat certain calculations or lines to make formulas even better.

Copyright ©2021 - Quandary Consulting Group