It is possible to specify, that some design elements should only be included if a certain condition is met. For that you could use the If element as described below. A more advanced option is to use the select element.
You can insert an If element with this icon:
If you insert a condition for a spooled file, then you should consider activating the relative mode and setup an anchor line to make it easier to use the ng:spoolMapRel function if needed.
If the condition is true, then the elements placed in the sub-folder of the If element are executed:
The If element has no 'else' option. If you want that functionality, then you should check out the select element.
You can find help regarding how to build up a valid condition in this video: