What version of FileMaker do you have?
If you have FileMaker 11 or 12, you might be able to use a portal to list the task line items and then a portal filter can filter out all line items if the status for the task record is "on holde'.
If you have an older version, you can define a relationship for the portal that does not match to any task line items if the task is on hold.
With either method, you can design the portal to be a very large number of rows tall, but then use "sliding & visibility" settings in the inspector to set the portal to slide up and to resize the enclosing part.
Key facts about sliding layout objects:
- It's only visible in preview mode and when you print/save as PDF...
- All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
- Objects in headers and footers will not slide.
- Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
- Fields will slide up only if Top, alignment is specified for it and will slide left only if left alignment is specified.
- Consistent side borders are difficult to achieve with sliding fields.
FMP 12 gives you a second option: Execute SQL that could be used in place of the portal, but I see no real advantages to doing so here.