# Run another flow

> Hand over to a sub-flow with values, then continue when it finishes.

Source: https://docs.buildcord.dev/nodes/flow-control/run-flow/

`flow.call` runs a [sub-flow](https://docs.buildcord.dev/nodes/triggers/sub-flow), gives it values, and carries on with what it hands back.

## Settings

| Setting | What it does |
| --- | --- |
| Flow | The sub-flow to run. Choose **Choose a flow** until you pick one. |
| Give it | One `name: value` per line, such as `amount: {option.amount}`. The sub-flow reads each as `{input.name}`. |

## Ways out

`out`, taken when the sub-flow finishes. Turn on **If it fails** for a red way out.

## Produces

`{result.name}` for each value the sub-flow handed back with [Hand back](https://docs.buildcord.dev/nodes/flow-control/hand-back). Running another flow clears the results of the one before.

## Notes

- The sub-flow also sees the same run's values, such as `{user.id}` and `{temp.name}`, and what it sets with `{temp.name}` is seen here afterwards.
- Its inputs are its own: once it's done, `{input.name}` here is what this flow was given, if it's a sub-flow too.
- If the sub-flow pauses, for a button or a wait, this flow carries on without waiting for it.
- A sub-flow that nothing calls never runs, and the checker warns you.
- The canvas shows the sub-flow's name.

## Example

A `Charge` sub-flow takes `user` and `amount`, takes the amount off their balance, and hands back `balance`. `/buy` and `/bet` both run it and reply with `{result.balance}`.

## Related

- [Sub-flow](https://docs.buildcord.dev/nodes/triggers/sub-flow)
- [Hand back](https://docs.buildcord.dev/nodes/flow-control/hand-back)
