# Mqtt Publish script help

**URL:** <https://forum.inductiveautomation.com/t/mqtt-publish-script-help/26187>\
**Category:** 3rd Party Modules\
**Created:** [June 30, 2019, 11:33am UTC](https://forum.inductiveautomation.com/t/mqtt-publish-script-help/26187 "2019-06-30T11:33:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.havenga](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@chris.havenga](https://forum.inductiveautomation.com/u/chris.havenga)\
**Post date:** [June 30, 2019, 11:33am UTC](https://forum.inductiveautomation.com/t/mqtt-publish-script-help/26187/1 "2019-06-30T11:33:47Z")

</div>

Is it possible to script so that the machine number changes dynamically according to a defined custom property.  
I am using tag event scripts to publish the value of the tag to a mqtt topic:  
system.cirruslink.engine.publish(" Chariot", “MA1/Probes/CH1LowSPSub”, str(currentValue).encode(), 0, 0)

MA1 represents the machine number to be sent to. I need to script so that the 1 changes/follow according to the custom property number.
