Hi,
i how can i set when the number reach '10' then the next inject will be reset it and start from '0' ?
[{"id":"b45544f267d46e64","type":"tab","label":"Flow 6","disabled":false,"info":"","env":[]},{"id":"e9181172966c6842","type":"function","z":"b45544f267d46e64","name":"function 2","func":"if (msg.count == 10)\n msg.count = true;\nelse if (msg.count == \"reset\") \n \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":580,"wires":[["b98146ef.0ab288"]]},{"id":"33f1976d.907798","type":"inject","z":"b45544f267d46e64","name":"increment","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":540,"y":440,"wires":[["381f2c71.f7670c"]]},{"id":"381f2c71.f7670c","type":"counter","z":"b45544f267d46e64","name":"","init":"0","step":"1","lower":"","upper":"","mode":"increment","outputs":"1","x":700,"y":500,"wires":[["295107a1.67cc58","b98146ef.0ab288","e9181172966c6842"]]},{"id":"b98146ef.0ab288","type":"change","z":"b45544f267d46e64","name":"flow.counter = count ","rules":[{"t":"set","p":"counter","pt":"flow","to":"count","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"count/1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":500,"wires":[["ea0c2a5f.fcd858"]]},{"id":"9b5e941a.b9cbf","type":"inject","z":"b45544f267d46e64","name":"reset","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":270,"y":500,"wires":[["6f0843b0.c5be9c"]]},{"id":"6f0843b0.c5be9c","type":"change","z":"b45544f267d46e64","name":"delete flow.counter, reset count","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"delete","p":"counter","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":500,"wires":[["381f2c71.f7670c"]]},{"id":"295107a1.67cc58","type":"debug","z":"b45544f267d46e64","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"count","targetType":"msg","x":870,"y":440,"wires":[]},{"id":"ea0c2a5f.fcd858","type":"debug","z":"b45544f267d46e64","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"count","statusType":"msg","x":1170,"y":500,"wires":[]}]