How can I avoid having to open and close a database connection twice when working with a sub-workflow that is only called when a certain condition is met?

@MgntMoe one option might be to just add a RowFilter and export the results without a switch? If you absolutely must have a sub-workflow you might as well just store the data in a table and read it back in without JSON.