# Repost State of Mqtt Topic if other Topic's state is 1

**URL:** <https://discourse.nodered.org/t/repost-state-of-mqtt-topic-if-other-topics-state-is-1/24040>\
**Category:** General\
**Created:** [1 April 2020 15:34 UTC](https://discourse.nodered.org/t/repost-state-of-mqtt-topic-if-other-topics-state-is-1/24040 "2020-04-01T15:34:48Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 April 2020 18:15 UTC](https://discourse.nodered.org/t/repost-state-of-mqtt-topic-if-other-topics-state-is-1/24040/8 "2020-04-01T18:15:09Z")

</div>

What are you switching on in the second one? It should actually msg.payload.topicy (or whatever the topic actually is). My previous post seems to have had a mistake that I assume I subconsciously made in order to see if you were paying attention 🙂

If still no joy then post the flow after reading

> [@How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506):
>
> To share code samples or flow json in this forum, you need to take care to format it properly so that it is displayed correctly. The easiest way to do that is to click the 'Preformatted Text' button in the toolbar: [image] Then paste in your code or flow json. You should end up with three back-tick characters - ``` - on their own line before and after the code. On standard US English keyboards, this is on the same key as the ~ character. Using the backticks will ens…

---

_[View the full topic](https://discourse.nodered.org/t/repost-state-of-mqtt-topic-if-other-topics-state-is-1/24040)._
