I need to create an application to design cost analyses and breakdowns of those analyses.
Cost analyses are stored in a table called E_PROCESOS_GIII, which acts as a parent table. Then, there’s a child table called E_PROCESOS_GIV, where production components are stored. These analyses consist of two types of components: inputs and other processes, resulting in a nested structure.
When composing a process for the first time, it can only consist of inputs since no other processes exist. These are referred to as “first-generation processes.”
New processes can always store processes of lower generation to avoid cyclic redundancy, infinite loops, or illogical relationships.
In addition to creating productive processes, I’m interested in retrieving the inputs needed for each process from the database. For instance:
To make “flour fractionation,” I need two inputs: flour and a bag (process).
To make “yeast fractionation,” I need two inputs: yeast and a bag (process).
To make “salt fractionation,” I need two inputs: salt and a bag (process).
To make a Vienna bread, I need “flour fractionation,” “yeast fractionation,” and “salt fractionation,” along with water (input).
I must create them as explained. However, the purchasing department requests a list of inputs to make Vienna bread. They want to know the quantity of bags, flour, salt, and yeast needed to make a batch of Vienna bread so they can purchase them.
Therefore, once all productive processes are composed in the E_PROCESOS_GIV table, the list of inputs involved for each process should be copied to another table. I’ve created a table called E_INVENTARIO to store parent processes with the inputs that compose the child processes and the direct input components.
How do you suggest I approach this problem in AppSheet?