Hi Ian,
Let's assume your search stores its result in a property named SEARCH_RESULT.
Locate your file in the Files and Folders page, right click it and select "Go to component" from the context menu.
You will be taken to the component to which your file belongs.
With this component selected, go to the right pane and in the "General" section of this pane you will find the "Condition" field. Depending on this condition, your component (and all resources that belong to it including your file) will be installed or not.
Fill in this field like this:
Thus your file will only install if SEARCH_RESULT has a value (it only has a value when the search was successful)
Best regards,
Gabriel
FOLLOW US
Get the latest news in Application Packaging