This is my first post on here; so far I’ve been able to work through any obstacles I’ve come across based on reading previous posts, but I’ve finally gotten stumped on something where I can’t find a previous post with the same context as what I’m trying to do. In a nutshell, my app does the following:
- Parent record/table records an order line item with an order quantity (among other information)
- Each parent record has multiple child records
- Each child record is for a pallet of product we manufacture for that order
- Each child record has a quantity built field (which is filled out when the pallet is started) as the quantities are a default, and a status field that has logic to update based other criteria that determine when manufacturing and inspection processes are completed.
- There can be multiple child records in a “In process” status at a given time due to multiple workstations for the same order line item.
I’ve created a VC in my order line items table for the current sum of completed child records. As the status for the child records changes to “completed”, this VC field updates to show the current completed quantity. For example, there is a parent order line item record for 100 parts & 5 child records, each for a pallet of 20 parts (in 5 separate workstations). As the child records’ status changes to “complete”, the VC field updates, eventually to 100 when all child records are in a complete state.
The problem I’m having with my expression is getting the the appropriate “IF” criteria to work for the child records. Right now, I’m successfully summing all child records regardless of the child records’ status field, but whenever I try adding the “status” qualifier, I get some sort of error. Here’s my latest attempt that’s not working:
I feel like I’ve gotten too far into the weeds in trying to figure this one out so a fresh perspective would be helpful.