---
title: "moveAction(at:to:)"
framework: automator
role: symbol
role_heading: Instance Method
path: "automator/amworkflow/moveaction(at:to:)"
---

# moveAction(at:to:)

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

## Declaration

```swift
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

Discussion If either index is invalid, this method does nothing.

## See Also

### Manipulating the Workflow’s Actions

- [addAction(_:)](automator/amworkflow/addaction(_:).md)
- [insertAction(_:at:)](automator/amworkflow/insertaction(_:at:).md)
- [removeAction(_:)](automator/amworkflow/removeaction(_:).md)
