# Cycle through outputs

**URL:** <https://discourse.nodered.org/t/cycle-through-outputs/57261>\
**Category:** General\
**Created:** [26 January 2022 13:57 UTC](https://discourse.nodered.org/t/cycle-through-outputs/57261 "2022-01-26T13:57:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [26 January 2022 14:24 UTC](https://discourse.nodered.org/t/cycle-through-outputs/57261/4 "2022-01-26T14:24:40Z")

</div>

You could easily adapt this to output "Scene x" instead of colours:

> [@MQTT - Single button press - multiple different actions (in order/sequence)](https://discourse.nodered.org/t/mqtt-single-button-press-multiple-different-actions-in-order-sequence/50125/2):
>
> You need to remember last state. for this there are several solutions. The easiest (for me) is a function node... [image] [{"id":"75f941daf629c2ba","type":"inject","z":"219b0be6.926804","name":"fake button","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":1570,"y":320,"wires":[["bcc8bbbf106ec10f"]]},{"id":"bcc8bbbf106ec10f","type":"function","z":"219b0be6.926804","name":"colour cycle","…

---

_[View the full topic](https://discourse.nodered.org/t/cycle-through-outputs/57261)._
