Use Documate's Invisible Logic feature to create new variables and capture multiple layers of logic.
(1) set complex logic to questions and pages in the questionnaire, or
(2) in your documents, if you prefer to set logic globally in the Documate interface instead of in your individual Word and PDF documents.