Set number of message parts in Join node via msg

Hello,

I need to dynamically set this property of Join node. I've a modbus node sending messages and joining them every 30 messages in an array of objects (values and addresses). How can I change this number via msg?

Is better to create a function? Anyone has an example? I've tried but has problem with for-loop.

If a message is received with the msg.complete property set, the output message is finalised and sent. This resets any part counts

so on your last message just add a msg.complete with any value

I'll try this solution, thankou.