Merge Variables Node (Inactive Brach)

Hi friends,

I’m trying to apply the “Case Switch node” in an operation with a Group Loop.

But my problem isn’t with them.

My issue is that I’m creating the file name dynamically.

Explanation:

In the Case Switch Node:

  1. If Branch 1 is active, a specific file name will be created.

  2. If Branch 2 is active, a Group Loop will start to “split the file into 3 parts,” and a dynamic file name will be created for the 3 files.

I’m using only one CSV Writer,

so I need to use the Merge Variables node to combine both options.

My problem is that the Merge Variables node doesn’t accept connecting a variable with 1 inactive branch (screenshot 2).

My goal was that regardless of the chosen branch, I would pass the file name variable.

(I think I should use some kind of Try-Catch so that after the inactive branch, I can force a valid variable.)

My question is: How could I solve this situation? Which node could I use to pass a valid result at this point of the inactive branch? (screenshot 3)

(Honestly, I don’t know if this is the best strategy for the workflow, but it’s what I have at the moment.)

(main workflow)

(screen shot 2)

(screen shot 3) Brach Inative (string to path)