I have this flow that works fine without the Switch
If i set in the switch that sort on msg.topic == Cart01, msg.topic == Cart2, etc. like picture below it wont work. All the message have the topic to Cart01.
If you wanna help the code is here. Thanks
I am not a programmer so i like answer to use in nodes please... If possible affcourse.
[{"id":"98714863.006c68","type":"ui_text","z":"89f03bbf.93f678","group":"242d1b9c.039d64","order":15,"width":7,"height":1,"name":"1 lap time","label":"<font size=15>Lap time","format":"<font size=15>{{msg.laptime}} ","layout":"row-spread","x":4120,"y":1460,"wires":[]},{"id":"65f8eb04.e95e44","type":"ui_text","z":"89f03bbf.93f678","group":"242d1b9c.039d64","order":4,"width":5,"height":1,"name":"1 Best lap","label":"<font size =6>Best lap","format":"<font size =6>{{msg.bestlap}} ","layout":"row-spread","x":4120,"y":1380,"wires":[]},{"id":"59d60ac6.37c224","type":"change","z":"89f03bbf.93f678","name":"","rules":[{"t":"set","p":"laptime","pt":"msg","to":"laptime","tot":"flow"},{"t":"set","p":"lastlaptime","pt":"flow","to":"laptime","tot":"flow"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":3260,"y":1440,"wires":[["604ca9d2.047f78"]]},{"id":"fb08ea92.63d058","type":"switch","z":"89f03bbf.93f678","name":"","property":"bestlap","propertyType":"flow","rules":[{"t":"gt","v":"laptime","vt":"flow"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":3050,"y":1520,"wires":[["1f874d7b.9471a3"],[]]},{"id":"1f874d7b.9471a3","type":"change","z":"89f03bbf.93f678","name":"","rules":[{"t":"set","p":"bestlap","pt":"msg","to":"laptime","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":3260,"y":1520,"wires":[["9779c6e8.54acc8"]]},{"id":"9779c6e8.54acc8","type":"moment","z":"89f03bbf.93f678","name":"Format bestlap","topic":"","input":"bestlap","inputType":"msg","inTz":"Africa/Abidjan","adjAmount":0,"adjType":"milliseconds","adjDir":"add","format":"mm:ss","locale":"en-US","output":"bestlap","outputType":"msg","outTz":"Europe/Copenhagen","x":3500,"y":1500,"wires":[["65f8eb04.e95e44"]]},{"id":"604ca9d2.047f78","type":"moment","z":"89f03bbf.93f678","name":"Format laptime","topic":"","input":"laptime","inputType":"msg","inTz":"Africa/Abidjan","adjAmount":0,"adjType":"milliseconds","adjDir":"add","format":"mm:ss","locale":"en-US","output":"laptime","outputType":"msg","outTz":"Europe/Copenhagen","x":3500,"y":1440,"wires":[["98714863.006c68"]]},{"id":"1edc99d4.b43e26","type":"moment","z":"89f03bbf.93f678","name":"Format bestlap","topic":"","input":"bestlap","inputType":"msg","inTz":"Africa/Abidjan","adjAmount":0,"adjType":"milliseconds","adjDir":"add","format":"mm:ss","locale":"en-US","output":"bestlap","outputType":"msg","outTz":"Europe/Copenhagen","x":3500,"y":1380,"wires":[["ff49e179.e3306","65f8eb04.e95e44"]]},{"id":"5d646448.8b71ac","type":"change","z":"89f03bbf.93f678","name":"","rules":[{"t":"set","p":"bestlap","pt":"msg","to":"laptime","tot":"flow"},{"t":"set","p":"bestlap","pt":"flow","to":"laptime","tot":"flow"},{"t":"set","p":"lastlap","pt":"flow","to":"laptime","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":3260,"y":1380,"wires":[["1edc99d4.b43e26"]]},{"id":"ff49e179.e3306","type":"change","z":"89f03bbf.93f678","name":"","rules":[{"t":"set","p":"laptime","pt":"msg","to":"bestlap","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":3740,"y":1320,"wires":[["98714863.006c68"]]},{"id":"242d1b9c.039d64","type":"ui_group","name":"GOKART 1","tab":"9ebba496.680ec8","order":2,"disp":true,"width":"30","collapse":true},{"id":"9ebba496.680ec8","type":"ui_tab","name":"Race board","icon":"dashboard","disabled":false,"hidden":false}]