Issue with Recursiveness (Ran out of resources evaluating)

Hi,

I have the following table, which has a column named Child_of that is a reference column to the same table:

jrullan_0-1693512073468.png

I then have these columns in Appsheet:

jrullan_1-1693512144117.png

It adds two virtual columns: Children_Items and Children_Cost.

Children_Items formula:

jrullan_2-1693512221068.png

And Children_Cost formula:

jrullan_3-1693512279238.png

This formula gives error:

jrullan_4-1693512346191.png

However... When editing the formula (before saving), you can test the formula and the test succeeds in giving the expected result which is a compounded sum of the Children_Cost in bundled items.

jrullan_5-1693512780023.png

 

But after saving Appsheet complains about resources, even though it could come up with the correct calculation during testing.

I think this is a weird infinite loop thing... but in order for that to be true, Appsheet is ignoring that it should only sum the [Children Items] which of course are not infinite. Shouldn't  this work in any other database system?

 

 

 

 

3 4 135
4 REPLIES 4

You are introducing the possibility of an infinite recursion, dependent on the data. Appsheet only checks for that possibility, not if such a situation exists in the data, and doesn't allow it.

That's a bummer. Maybe there is a workaround to this problem, I just haven't found one.

Instead of using virtual columns. you might try using reference actions to trigger the updates of real columns up the chain.

I'll try this approach. Thanks for the suggestion.

Top Labels in this Space