Workflows: move existing blocks to multi-step function

I run into cases where I build a workflow, then later on realize that I want to move the existing blocks into a loop function. I know, I should plan better, but it would be nice to be able to move existing blocks into a new function so that I don’t have to rebuild the workflow within the multi-step function.

I have a feeling a lot of people have this issue, seeing how easy it is to get carried away building workflows :sweat_smile: Not a deal breaker, but it is a PITA and cause for misconfiguration

Hello @Jim_Okada!

When you select multiple blocks in a workflow, you can right click to create a function out of those blocks:

Which you can then run and call in a loop:

I’m not sure why the Loop Runner in the last screenshot isn’t showing function3 in the selection drop down, but that’s the one I created in the previous step. I looped it 4 times and got the output back 4 times so it seems like you should be able to do something similar.

You will have to setup the inputs/outputs properly to continue the processing from the current workflow so depending on the function YMMV.