Helper function to report the parent record

report_parent(fail, has_parent, table_name, id, id_key)

Arguments

fail

logical, current fail status

has_parent

logical vector, whether the parent record is present

table_name

character, the name of the table

id

character, the ID column

id_key

named vector, the ID key

Value

logical, the updated fail status