Guide
This is a text version of the formulas video for those who appreciates reading. Good for you! I added some stuff that expands on the video, so extra treats.
Every field in Fibery stores what you type into it. A formula field doesn't — it transforms data you already have into something new.
Formulas are also read-only and they can't change your data, only recalculate it. So they can't break anything.
And a formula can only reach into stuff it's related to. An attraction can count its tasks, not every task in the workspace. No relation, no reach.
Below we'll look at formulas, what they can do and how to build them.
Lookups
Let's go belt by belt - karate style, starting with the white belt.
Lookups is your first move - they show something here that actually lives elsewhere (e.g. different database).
For example, you're on a Task and want to know if the ride it belongs to is open or closed.
Because lookup is so popular it is its own field type. In other words, no need to reach for a formula just yet, just go with Lookup from…
Pick the relation you want, then a field you wanna show in the current database. When you're done you'll see your ride state in the Tasks database.
However, the Lookup stops at just one level. If you want to reach deeper, you'll have to upgrade to a full-fledged formula.
Say your park is split into zones, and you want the zone on the task. The task knows its ride, the ride knows its zone — two levels. This is the formula: Attraction.Zone.Manager
Only syntax here is a dot. All it does is looks inside the thing on the left. Think of a dot as a door.
Rollups
If the lookup was your jab, the rollup is your straight punch - you'll throw both a thousand times. A rollup takes a stack of the same thing (e.g. Date field) and rolls it into one value.
For example, each attraction gets safety inspections, and each inspection has a date. Point a formula at the Inspections database and roll all those dates into one answer: when was this ride last checked? This is how: Inspections.Max(Date)
Now what if you want to know if that last inspection was a success? You'll need to sort some dates, like this: Inspections.Sort(Date).Last().Result
You can use this on other stuff too, like the next due date, the soonest deadline first: Tasks.Sort(Due).First().Name. Notice the First there, it reaches to the other end the stack.
Next up, let's just count the inspections: Inspections.Count(). How many times has this ride been checked?
You can also roll up only a part of the stack. Like if you only care about which Attractions have failed recently. Use this: Inspections.Filter(Result = "Failed").Count()
Filter here keeps only what matches it, Count works with what's left after the filter. This works the same with any rollup like Sum or Avg.
Finally, let's get a nice % on our database. Which attractions pass the test most often?
Inspections.Filter(Result.Name = "Passed").Count() / Inspections.Count()
If you love building progress bars - this is how. In fact, let's do just that.
Formula when?
How do you know you need a formula in the first place? Three signs:
You're flipping between records and assembling the answer in your head
You are checking a few fields and doing math in your head (bad!)
You have a niche problem and need a snowflake formula (we actually encourage this, welcome home)
With that, the white belt is yours. You can now defend yourself from bullies. Or be one. But you're not winning any tournaments just yet.
Logic formulas
Next up, logic formulas. They check something, then answer depending on what they find. If this — then that. This is your green belt.
If that sounds a lot like Automations , you are correct. But, an automation acts - it changes fields, moves states, creates things. A logic formula only answers a question. It looks at your data and tells you what it sees. Read only, remember?
Let's start with a single comparison: Today() > [Due Date] Is today past the due date, yes or no?
About those square brackets []. All they do is wrap a field name that is longer than one word, like [Due date] or [Client list].
Next move is the if. Take that same comparison and wrap it with conditions. If(Today() > [Due date], "Late", "On track")
If always takes three things: a condition, yes result, no result. Our condition is the checkbox from before, the results are whatever you want the field to say.
Another example. Rides don't live forever, so each attraction has a Retired on date: If(IsEmpty([Retired on]), "Operating", "Retired")
How about checking more than one thing at once? Sure. Our park runs seasonal events, each has a start date, end date: If((Start <= Today()) and (Today() <= End), true, false)
Two checks — today is past the start, today is before the end — and operator wants both to pass. Or is another operator you can use, and unlike and it only needs one condition to pass not both.
You can also nest several ifs. Every ride has a wait time in minutes, but visitors want the board to say it plainly: Long, Medium or Short.
If([Wait time] > 60, "Long", If([Wait time] > 20, "Medium", "Short"))
Last green belt move. Say you have a view that relies on dates, or a math formula somewhere. An empty field there is trouble - because your stuff disappears from the timeline if there isn't a set date. So let's use IfEmpty: IfEmpty([Finished date], [Due date])
Think of it as a fuse, a backup. If the date is there - good, if not then this formula will back up your timeline. Same goes for a math formula that relies on actual inputs.
Writing formulas
For that, check Companion doc for getting started with formulas. It has every function and operator, each with examples. Or you can use AI to write formulas for you - it's one of the best AI things in Fibery.
It's up to you how deep you wanna go.
Black belt
Let me show you some power moves.
Our ops folk want one thing: to see which rides are up for a safety check. This is the formula: If((ToDays(Today() - Inspections.Max(Date)) > 14) and (State.Name != "Closed"), "🔧", "")
A ride that needs a check now waves a wrench at you. Now, look closer. Inspections.Max(Date) is your straight punch from the white belt. Today minus that date is a gap that ToDays turns into actual days passed. And operator checks the rides: affect only the rides still open.
And that's the whole thing. Black belt is not new punches — it's flow, the moves you know, chained.
Here is an example - two formulas.
First one answers a simple question, second one uses the first one for a different question. In karate talk: not more punches, fewer punches that land.
Let's rate new ride ideas on three dropdowns: Impact, Confidence, Ease. Every select option can carry a hidden number: High (3), Medium (2), Low (1).
So drop a value function inside a formula, multiply everything by everything and make your backlog rank itself:
Ease.Value * Confidence.Value * Impact.Value
Formulas also live inside automations, and the rules there change a bit. You get Now(), because automations care about minutes, instead of Today(). You get Step 1, so a formula can use what a previous action just did.
And finally - you can reach into any database, no relation needed. Unlike a regular formula that only touches related stuff, formulas in automation reach anywhere.
Try formulas yourself
That's all the belts. Take the companion doc and get cooking, or experiment with AI formulas. Try this in your space and reach out to us for help if you get stuck.
Have a blessed day.