Hi Markus,
An option would be to create “layers” in your questionnaire, and use that layer structure to make questions dependent on other questions. You can accomplish this by viewing a question as a more generalized “Element” entity (e.g. the object can be of type (stand-alone) question, but also a text block or a category), then using one or more self-references to create the layer structure between the Elements in the questionnaire. Then in your questionnaire set-up, you can define on runtime that e.g. Question B belongs to Question A.
In the example below, I defined that this question belongs to subcategory “Scaffold”, which is a subcategory of the category “Collective fall protection” (2 layers deep). Using custom on-change logic and conditional visibility, I can make the dependent questions irrelevant and hidden when they are not in scope:
\
Questionnaire with scaffold answered “yes”
Questionnaire with scaffold answered “no”:
Hope that helps.