# Track looping
URL: https://docs.awellhealth.com/docs/design-care-flows/track-looping

> For the complete documentation index, see [llms.txt](https://docs.awellhealth.com/llms.txt).





Follow-ups, reassessments and ongoing monitoring repeat until something changes. **Track looping** models
that directly, instead of copying a track several times and hoping the count is right.

## Add a loop to a track [#add-a-loop-to-a-track]

1. Open the care flow and go to the **Build** tab.
2. Expand the track to loop.
3. Click **Edit track looping**.
4. Set the loop condition:
   * a **maximum number of iterations**
   * an optional **stop condition** for ending the loop early
5. Save.

<img alt="The track looping configuration, with a maximum number of iterations and a stop condition based on a data point" src="__img0" />

A maximum and a stop condition can both be set. The track stops at whichever is reached first.

## A maximum number of iterations is required [#a-maximum-number-of-iterations-is-required]

Set a maximum; when the track reaches it, looping stops.

The maximum keeps loops predictable, and prevents a typo from leaving a care flow running forever against
a real patient.

For a loop that should run "until" something rather than a fixed number of times, set the maximum high,
say 100, which behaves like an open-ended loop while keeping a safe upper bound.

## A stop condition ends the loop early [#a-stop-condition-ends-the-loop-early]

A **stop condition** lets the track leave the loop when something is true. Conditions are based on
**data points** and use the same conditional logic as the rest of the care flow, so a "patient reported
no symptoms" answer can end a monitoring loop.

Without a stop condition, the track loops until it reaches the maximum.

## Next steps [#next-steps]

**Next:** [The Timer component](/docs/design-care-flows/the-timer-component) to control the delay
between iterations.
