On entry to opening the form screen, set a " Unique Identifier" value to a column. That can become the link between your “declarations” and “actions”.
When you add a row for the declaration, make sure you get the “Unique Identifier” value in as a column. Same thing for actions. Then you can have a relation between those 2.