# BUG: Infinite loop with Name formulas

**URL:** <https://community.fibery.io/t/bug-infinite-loop-with-name-formulas/1838>\
**Category:** Bugs & Issues\
**Created:** [July 26, 2021, 6:22pm UTC](https://community.fibery.io/t/bug-infinite-loop-with-name-formulas/1838 "2021-07-26T18:22:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [July 26, 2021, 6:22pm UTC](https://community.fibery.io/t/bug-infinite-loop-with-name-formulas/1838/1 "2021-07-26T18:22:48Z")

</div>

If  
`[Type 1].Name` is a formula that references `[Related Type 2].Name`, and  
`[Related Type 2].Name` is a formula that references `[Type 1].Name`,  
you get an infinite loop with ever-growing Names 😳

This may also be true for other formula fields – I only tested Name formulas.

---

<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:** [July 26, 2021, 10:13pm UTC](https://community.fibery.io/t/bug-infinite-loop-with-name-formulas/1838/2 "2021-07-26T22:13:51Z")

</div>

Yeah, I’ve discovered a few ways (by accident) to get stuck in infinite loops 😕  
I think that the Fibery team know the possibility exists (and that they plan to fix):

> [@'Recursion' in formulas for self-related types](https://community.fibery.io/t/recursion-in-formulas-for-self-related-types/1682/4):
>
> Similar problem exists in Fibery formulas, but please don’t tell anyone sweat_smile. Soon we will add a loop prevention mechanics to formulas, so if some calculation causes recalculation of the same formula several times, we will not recalculate it, reporting a loop detection. We have such mechanics in Automation Rules, need to spread it to formulas as well.

Similar things can happen in Coda, and I’ve had occasions where the only fix was to delete the table ☹

---

<div class="post-metadata">

**Author:** ![Sergey\_Truhtanov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/sergey_truhtanov/32/13986_2.png) [@Sergey\_Truhtanov](https://community.fibery.io/u/Sergey_Truhtanov)\
**Post date:** [July 27, 2021, 9:27am UTC](https://community.fibery.io/t/bug-infinite-loop-with-name-formulas/1838/3 "2021-07-27T09:27:35Z")

</div>

We will fix that problem in the nearest future. If loop is detected, following formula calculation will be stopped.

---

<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:** [August 3, 2023, 7:44am UTC](https://community.fibery.io/t/bug-infinite-loop-with-name-formulas/1838/4 "2023-08-03T07:44:54Z")

</div>

Just adding a note that formula loop detection has been implemented (quite some time ago!)
