Welcome to the Alteryx Knowledge Base

Controlling the Order of Operations
user

Created/Edited - 7/2/2026 by Dan Hilton | Alteryx

How To
Explicitly control the order of tool execution.
Procedure
Sometimes, especially when interacting with tools/files outside Alteryx, you need to explicitly control the order of tool execution.

The classic example is a process whereby you:
  1. INSERT to a SQL table where an auto-incrementing ID is applied
  2. Read the records back in order to get the auto-incremented id
  3. Insert the auto-incremented ID into a different table.

In Alteryx worflow streams that terminate (as in an Output or Render), you can't reliably use Block Until Done to control the stream. One way to reliably control the order of events is with batch macros.

Batch macros guarantee that:

  1. Every iteration is complete before the next iteration begins
  2. That all iterations are complete before the macro reports itself complete.
So if you place a process inside a batch macro and create an output stream from that macro, all processing will be done and the macro still can exist in the middle a workflow stream. You don't even need a Block Until Done as part of the process.
Additional Information
Please see the attached examples.
 

Control Containers, released in Designer 2023.1, also allow for control of order of operations. See our Help Docs for more info: Control Container Tool

Attachments

OrderOfEventsExample 1.yxzp

Was this article helpful?