Guide
https://youtu.be/gjeERWqE3iQ?si=ZIyWu92W56pZOr6L
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 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. Edit your formula and under FORMAT choose Percent. Click on your Field and set Display as > Progress bar.
When to use formulas
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
Check Formulas list. 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.
Advanced formulas
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 just counts tasks, second one uses the first and shows the workload.
Tasks.Count() then If([Task count] > 5, "Heavy", "Light")
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).
Make sure to turn on Specify numeric value for each option.
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 inside automations
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 a Formulas list 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.
Bonus: formulas from the video
If you followed our video along, here is every formula used there, in the order it showed up. Copy, paste, tweak.
Lookups & rollups (white belt)
Formula (from the video) | What it does | IRL example |
|---|
Attraction.Zone.Manager
| two-level lookup: task β ride β zone β manager | a workspace's billing country, two hops through its subscription and that subscription's customer Subscription.Customer.Country
|
Inspections.Max(Date)
| latest inspection date for this ride | an investor's last-contacted date, rolled up from every interaction logged with them Interactions.Max(Date)
|
Inspections.Sort(Date).Last().Result
| pull any field off the newest inspection | the stated reason behind a workspace's most recent cancellation Subscriptions.Sort([Cancelled Date]).Last().[Cancel Reason]
|
Inspections.Count()
| how many inspections this ride has had | total candidates who've applied to a job position Candidates.Count()
|
Inspections.Filter(Result = "Failed").Count()
| count just the failed inspections | candidates still sitting unprocessed in a hiring pipeline Candidates.Filter(State.Name = "New").Count()
|
Inspections.Filter(Result.Name = "Passed").Count() / Inspections.Count()
| pass rate as a percent | the Sean Ellis PMF survey score, straight out of Superhuman's product-market-fit template Responses.Filter([...].Name = "Very disappointed").Count() / Responses.Count()
|
Logic (green belt)
Formula (from the video) | What it does | IRL example |
|---|
Today() > [Due date]
| is this task overdue? | literally the same formula, used to flag an overdue asset-maintenance request Today() > [Due date]
|
If(Today() > [Due date], "Late", "On track")
| turn that check into a status label | a salary record's status: Future, Current, or Past If([Approval Date] > Today(), "Future", If([End Date] < Today(), "Past", "Current"))
|
If(IsEmpty([Retired on]), "Operating", "Retired")
| flag rides with no retirement date | a payroll record is "Current" until it gets an end date If(IsEmpty([Valid To]), "Current", "Past")
|
If((Start <= Today()) and (Today() <= End), true, false)
| is this event live right now? | exact same formula, used to flag whether a Shape Up six-week cycle is currently active If((Start <= Today()) and (Today() <= End), true, false)
|
If([Wait time] > 60, "Long", If([Wait time] > 20, "Medium", "Short"))
| nested If β three-way wait time label | a real billing-dunning ladder, escalating by days unpaid If([Unpaid For] <= 14, "Banner for admins", If([Unpaid For] <= 21, "Banner for everyone", If([Unpaid For] <= 28, "Workspace locked", "π€¨")))
|
IfEmpty([Finished date], [Due date])
| fall back to the planned date when the actual one's empty | a conversation shows its logged date if set, else falls back to when the record was created IfEmpty(Date, [Creation Date])
|
Combos (black belt)
Formula (from the video) | What it does | IRL example |
|---|
If((ToDays(Today() - Inspections.Max(Date)) > 14) and (State.Name != "Closed"), "π§", "")
| flag open rides overdue for a safety check | flags an open CRM account that's gone quiet If((ToDays(Today() - Touches.Max(Date)) > 7) and (State.Final != true), "π", "")
|
Ease.Value * Confidence.Value * Impact.Value
| ICE score β rank ideas by three select fields | same three fields, same idea: this is Fibery's own GIST Planning template scoring its backlog Ease.Value * (Confidence.Value * Impact.Value)
|