# Circular Dependency

**URL:** <https://community.glideapps.com/t/circular-dependency/83455>\
**Category:** Ask for Help\
**Created:** [July 26, 2025, 12:01am UTC](https://community.glideapps.com/t/circular-dependency/83455 "2025-07-26T00:01:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbraunperu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mbraunperu/32/83676_2.png) [@mbraunperu](https://community.glideapps.com/u/mbraunperu)\
**Post date:** [July 26, 2025, 12:01am UTC](https://community.glideapps.com/t/circular-dependency/83455/1 "2025-07-26T00:01:29Z")

</div>

Hi Gliders! As you can see in the table attached, this is a typical inventory count. The columns are:  
“Stock Inicial” is just the initial stock  
“Entrada” is stock received  
“Salida” is stock sold  
“Stock Final” is Stock Inicial + Entrada - Salida  
But I am obtaining “Stock Inicial” with the columns “Index” and “rel\_PrevMonth”  
“Index” is just “Nro” - 1  
“rel\_PrevMonth” relates “Index” with “Nro” giving me the record just above.  
The lookup column “Stock Inicial” gets “Stock Final” from “rel\_PrevMonth” (stock final from the record above).  
And I would like “Stock Final” to be the lookup column + entrada - salida but GLIDE does not let me because of a circular dependency. So right now I am hard coding STOCK INICIAL in the number column, so that “Stock Final” can use that column. But ideally “Stock Final” should use the lookup column. How do I solve this problem?

 ![grid](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/1/0111480f8843de15e1479fb3691e9754feaeb090.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 26, 2025, 1:20am UTC](https://community.glideapps.com/t/circular-dependency/83455/2 "2025-07-26T01:20:16Z")

</div>

I’d suggest having a scheduled workflow run every 1st day of the month, at a time when you have finished all inventory calculations from the last month, to add a row where “Stock Final” from the last month is added as a regular number in the “Stock Inicial” for the new month.

Basically what you’re doing, but automatic.

---

<div class="post-metadata">

**Author:** ![mbraunperu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mbraunperu/32/83676_2.png) [@mbraunperu](https://community.glideapps.com/u/mbraunperu)\
**Post date:** [July 27, 2025, 5:58pm UTC](https://community.glideapps.com/t/circular-dependency/83455/3 "2025-07-27T17:58:10Z")

</div>

Thank you Thinh! Good solution!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 3, 2025, 5:58pm UTC](https://community.glideapps.com/t/circular-dependency/83455/4 "2025-08-03T17:58:47Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
