Circular Dependency

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?

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.

1 Like

Thank you Thinh! Good solution!

2 Likes

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