August 6, 200421 yr Hi, I'm having trouble finding an efficient way to determine which header records can be closed based on the status of the line items. Background: I have a simple two file DB in ver 6.x. The files are related like a typical purchase order; one header file and one line items file. Each line item can have a status of OPEN or CLOSED and the header also has a status of OPEN or CLOSED. How it works: The users open each line in a typical fashion. When thay have completed their work they change the status of the LINE ITEM to Closed. Later the manager visually scans the database looking for all HEADER records that are OPEN where all LINES have been CLOSED. These are the headers that can be closed. The Problem: I would like to be able to provide a LIST VIEW in the HEADER file that would show a summary of the statuses of the line items with logic like: If the header status = "open" and any line item status = "open" then display "Active" else display "Ready to Close". Thanks,
August 6, 200421 yr Create a calculation number field, cOpen, in the line items file of status = "open". In the header file, make your calculation Case( status = "open", Case( Sum(LI::cOpen), "Active", "Ready to Close" ) ).
August 9, 200421 yr Author Queue, Your formula got me 95% of the way there and I was able to figure out the remaining 5% on my own. It works as desired. Thanks for the help.
Create an account or sign in to comment