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...
>Or should I give up on native functionality and use IOL somehow?
QuickBase cannot perform a recursive query so you have to use script.
By sheer coincidence I have been developing a new technique to perform recursive queries using a feature in JavaScript called "asynchronous iterators". Actually, the technique I am developing can perform any sequence of asynchronous operations such as: (1) iterate through all applications in an account; (2) iterate through all users with access; (3) iterate through all tables in an application; or (4) recursively query a table (your case).
The demo that I am developing consists of a hypothetical organization chart of the characters from Our Gang:
I am still playing with the code but you will be able to iterate through all records using simple code such as the following:
async function example(dbid, ridRoot, clist, relatedFid) { for await (const record of asyncGet(dbid, ridRoot, clist, relatedFid)) { console.log(JSON.stringify(record), null, " "); } }
The functions you want to perform on your recopies (total ingredients) is similar to processing each individual in an organization chart (eg total salary or hours) or an indented bill of materials (eg total weight or cost).
Depending on my schedule this week I may post the demo. But in any case you can contact me off-world if you would like to pursue a solution:
This is a pretty advanced thing but asynchronous iterators make is extremely simple to iterate over promises. If you want to automate QuickBase this is the technology to learn.
While you wait for my post watch this entertaining video from the Fun Fun Function guy (Mattias P Johansson):