# Variables in formulas

**URL:** <https://community.fibery.io/t/variables-in-formulas/1277>\
**Category:** Ideas & Features\
**Tags:** formulas\
**Created:** [January 1, 2021, 5:13am UTC](https://community.fibery.io/t/variables-in-formulas/1277 "2021-01-01T05:13:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpaktop](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/tpaktop/32/6394_2.png) [@tpaktop](https://community.fibery.io/u/tpaktop)\
**Post date:** [January 1, 2021, 5:13am UTC](https://community.fibery.io/t/variables-in-formulas/1277/1 "2021-01-01T05:13:49Z")

</div>

Hi,  
I have been writing some quite advanced formulas in Fibery:

 ![Screen Shot 2021-01-01 at 1.08.23 pm](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/e/e2ef4fabfec9c40c4b4835d78222e7c330295051.png)

I found that after some time even I cannot figure out what the heck formula does as it’s all in one gigantic expression.  
Would it be possible to add support for variables so that formulas can stay readable overtime?  
My only workaround now is to create a bunch of other formula fields and use them instead. However, that creates a lot of unnecessary noise in the type structure.

---

<div class="post-metadata">

**Author:** ![Polina\_Zenevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/polina_zenevich/32/480_2.png) [@Polina\_Zenevich](https://community.fibery.io/u/Polina_Zenevich)\
**Post date:** [January 4, 2021, 6:07pm UTC](https://community.fibery.io/t/variables-in-formulas/1277/2 "2021-01-04T18:07:53Z")

</div>

Hi!  
You’ve risen a good problem and we will think about the solution.  
Remembering custom formatting + being able to write in multiple lines possibly would solve the problem. But maybe there is a better solution.

As for your certain case - you can convert TargetDuration to a number by a separate formula in the field, maybe that would help a bit 🧐

---

<div class="post-metadata">

**Author:** ![tpaktop](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/tpaktop/32/6394_2.png) [@tpaktop](https://community.fibery.io/u/tpaktop)\
**Post date:** [March 2, 2021, 4:33am UTC](https://community.fibery.io/t/variables-in-formulas/1277/3 "2021-03-02T04:33:57Z")

</div>

> [@Polina\_Zenevich](#):
>
> As for your certain case - you can convert TargetDuration to a number by a separate formula in the field, maybe that would help a bit 🧐

I was considering that but it would create another field which crowds the display. Is there a way to hide certain fields from card details UI?  
– EDIT –  
Sergey already [answered](https://community.fibery.io/t/support-for-map-in-formulas/1278/2) that

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [March 2, 2021, 3:41pm UTC](https://community.fibery.io/t/variables-in-formulas/1277/4 "2021-03-02T15:41:55Z")

</div>

I think it’s worth noting that the original request relates to [this](https://community.fibery.io/t/can-we-have-a-code-library-for-a-workspace/1354/4) and [this](https://community.fibery.io/t/where-to-put-code-for-reuse/1352).  
But it’s fair to say that helper formula fields that can be hidden from most users can have some advantages in usability over a centralised code respository, so the sooner we get field hiding (and/or other forms of grouping/arranging) the better 🙂

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://community.fibery.io/u/Sev)\
**Post date:** [October 21, 2025, 11:41am UTC](https://community.fibery.io/t/variables-in-formulas/1277/5 "2025-10-21T11:41:23Z")

</div>

> [@face\_with\_monocle Your opinion needed. Automations in Fibery (limitations and opportunities)](https://community.fibery.io/t/your-opinion-needed-automations-in-fibery-limitations-and-opportunities/9819/30):
>
> What would be really useful is also having shared functions across formula fields. That would allow to overcome current UI-level limitations of presenting data while not requiring creating redundant formula-level piece of functionality over and over like this one:
> 
> ```auto
> ToText(Year(Deadline)) +
> If(
> Month(Deadline) < 10,
> "0" + ToText(Month(Deadline)),
> ToText(Month(Deadline))
> ) +
> If(Day(Deadline) < 10, "0" + ToText(Day(Deadline)), ToText(Day(Deadline)))
> 
> ```
> 
> just to show date with leading zeros.

Yes, given that [JS in Formulas has been rejected](https://community.fibery.io/t/rejected-allow-javascript-in-formulas/960), shared functions in formulas, somewhat like “named formulas” in Coda, would be a helpful improvement for Fibery architects.
