<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMWorkflow/moveAction(at:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(cs)AMWorkflow(im)moveActionAtIndex:toIndex:"
  },
  "title" : "moveAction(at:to:)"
}
-->

# moveAction(at:to:)

Moves the action from the specified start position to the specified end position in the receiving workflow.

```
func moveAction(at startIndex: Int, to endIndex: Int)
```

## Parameters

`startIndex`

The start position of the action to move.

`endIndex`

The end position for the action that is moved.

## Discussion

If either index is invalid, this method does nothing.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)