StephanieDevin1
7 years agoQrew Trainee
Simple Recursive Formula
Hello!
Please see diagram attached. This is a setup where a recipe is comprised of recipe items (ingredients) and sub-recipes (nested recipes). The structure has no set limit on how many levels of nesting there may be. I am trying to figure out how to calculate cost in a formula field so the users can see a native update of cost in real-time, rather than having to wait for a script to run after they've built out the entire recipe. As I'm sure you can guess, this may save them time in going down a recipe path that becomes too costly. So the formula as it is currently set up should work (I believe) logically...and right after I save the formula it displays the correct amount. However, once the page is reloaded or I direct to a different page, it mysteriously overstates the number. I have tried converting the numbers to text and then back again, but they are still displaying incorrectly unless I've just modified the formula. Please help! I'm really hoping QuickBase has a way to make this work natively. Maybe there's a workaround you know of for simple recursion like this? Do you think a 'snapshot' of the lookup might work? Or should I give up on native functionality and use IOL somehow?
Thank you for your time & thoughts!
Please see diagram attached. This is a setup where a recipe is comprised of recipe items (ingredients) and sub-recipes (nested recipes). The structure has no set limit on how many levels of nesting there may be. I am trying to figure out how to calculate cost in a formula field so the users can see a native update of cost in real-time, rather than having to wait for a script to run after they've built out the entire recipe. As I'm sure you can guess, this may save them time in going down a recipe path that becomes too costly. So the formula as it is currently set up should work (I believe) logically...and right after I save the formula it displays the correct amount. However, once the page is reloaded or I direct to a different page, it mysteriously overstates the number. I have tried converting the numbers to text and then back again, but they are still displaying incorrectly unless I've just modified the formula. Please help! I'm really hoping QuickBase has a way to make this work natively. Maybe there's a workaround you know of for simple recursion like this? Do you think a 'snapshot' of the lookup might work? Or should I give up on native functionality and use IOL somehow?
Thank you for your time & thoughts!