Post

#PowerPlatformTip 118: 'Copy Actions in Switch/Condition'

#PowerPlatformTip 118: 'Copy Actions in Switch/Condition'

TL;DR: Right-click the action → Copy Action, then right-click the + inside the target case or branch → Paste an action (or Ctrl+C / Ctrl+V). The copy gets the suffix -copy. If it references an action from another case or branch, re-point that reference before you save, because sibling branches can’t see each other’s outputs.

💡 Challenge

You built an action in one case of a Switch (or the True branch of a Condition) and need the same action in another case. A copy that still points to outputs of an action in the original case can’t be saved: actions in parallel branches never run in the same path, so their outputs aren’t available to each other. The same applies to a copied scope whose inner actions reference something outside of it.

✅ Solution

Copy and paste the action directly into the target case, then check every reference in the copy. Anything that points to an action in a sibling case or branch must be replaced with an output that is available in the new location: the trigger, an action before the Switch or Condition, or an action earlier in the same case.

🔧 How It’s Done

1. Copy the action or scope.

🔸 Right-click the action and select Copy Action, or select it and press Ctrl+C. Container actions such as Scope, Condition, Switch or Apply to each are copied with everything inside.

2. Paste it into the target case or branch.

🔸 Right-click the + at the position in the target case where the action should go and select Paste an action, or press Ctrl+V.

🔸 The pasted action is named like the original, followed by -copy. Rename it so the flow stays readable.

3. Fix references that point into a sibling branch.

🔸 Open each parameter of the copy. If it uses dynamic content from an action that lives in another case or branch, replace it with an output that is available here, for example from the trigger or an action before the Switch.

🔸 If both cases need the same value, move the action that produces it in front of the Switch or Condition. Then both cases can use it.

4. Save.

🔸 The flow saves once no reference points to an unreachable action.

Classic designer: select … on the action, then Copy to my clipboard. In the target branch select Add an action, open the My clipboard tab and select the copied action.

🎉 Result

You can place actions or scopes inside Switches and Conditions without unresolved-dependency errors, keeping your flow structure clean and saveable.

🌟 Key Advantages

🔸 Fast duplication: copy whole scopes between cases instead of rebuilding them.

🔸 Valid references: you know which outputs a copied action may use in its new place.

🔸 Cleaner structure: values used by several cases end up in front of the branch, computed once.

🎥 Video Tutorial

🛠️ FAQ

1. Why does a copied action in another Switch case cause errors?

Because it still references outputs of actions in the original case. Cases of a Switch and branches of a Condition are parallel paths, and an action can only use outputs of actions that run before it in its own path.

2. Can I copy multiple actions or scopes at once?

Put them into a Scope and copy the scope. Container actions are copied with all actions inside. After pasting, check the references of the inner actions the same way as in step 3.

3. Can I copy actions between different flows?

Yes. The clipboard works across flows. Connections and references to actions that don’t exist in the target flow have to be fixed after pasting.

This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy – live Power Platform workshops, free or CHF 49. Join the workshop waitlist to get notified about new dates. For companies that want this implemented for them, see KMUpower – Power Platform consulting & automation for SMEs (DACH).

This post is licensed under CC BY 4.0 by the author.

Microsoft and the Power Platform product names (for example Power Apps, Power Automate, Copilot Studio) are trademarks of the Microsoft group of companies. This is an independent website. It is not operated, sponsored or endorsed by Microsoft.