# Automatic boolean toggle when data is updated

**URL:** <https://discourse.mcneel.com/t/automatic-boolean-toggle-when-data-is-updated/107314>\
**Category:** Grasshopper\
**Tags:** galapagos, realtime, boolean\
**Created:** [August 18, 2020, 6:00pm UTC](https://discourse.mcneel.com/t/automatic-boolean-toggle-when-data-is-updated/107314 "2020-08-18T18:00:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Rickson](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rickson/32/690545_2.png) [@Rickson](https://discourse.mcneel.com/u/Rickson)\
**Post date:** [August 18, 2020, 7:47pm UTC](https://discourse.mcneel.com/t/automatic-boolean-toggle-when-data-is-updated/107314/2 "2020-08-18T19:47:55Z")

</div>

0 being false and any integer being true, list length +1 on a stream filter should do it.

edit: Never mind, that only works on components taking buttons. If statement is the way to go.

> [@How to detect an update/change of a number?](https://discourse.mcneel.com/t/how-to-detect-an-update-change-of-a-number/69387/16):
>
> I guess the volume and/ or num of vertices of the mesh will never be identical to the previouse iteration of Millipede. The comparison of the Volume Mesh(current) with the previouse Mesh was just an idea of how to detect an geometry change and therefor to trigger Flexhopper again. No not yet. But you’re right that needs to be done as well. Otherwise Octopus would start a 2nd iteration after the 1st Flexhopper Iteration. But Anemone has the option “Output after the last”. So there needs to be 2n…

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/d/d/dd82520be82182e40d2898aa4be04d81ed05eec7.png)

---

_[View the full topic](https://discourse.mcneel.com/t/automatic-boolean-toggle-when-data-is-updated/107314)._
