  The interplay between off-shell and on-shell unfolded systems is analysed.
The formulation of invariant constraints that put an off-shell system on shell
is developed by adding new variables and derivation in the target space, that
extends the original $Q$-derivation of the unfolded system to a bicomplex. The
analogue of the Euler-Lagrange equations in the unfolded dynamics is suggested.
The general class of invariant on-shell equation constraints is defined in
cohomological terms. The necessary and sufficient condition for the on-shell
equation constraints being Euler-Lagrange for some Lagrangian system is proven.
The proposed construction is illustrated by the scalar field example.
