# Write variable when user change value in HMI

**URL:** <https://forum.inductiveautomation.com/t/write-variable-when-user-change-value-in-hmi/3854>\
**Category:** Module Development\
**Created:** [January 12, 2012, 7:11pm UTC](https://forum.inductiveautomation.com/t/write-variable-when-user-change-value-in-hmi/3854 "2012-01-12T19:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smorini](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@smorini](https://forum.inductiveautomation.com/u/smorini)\
**Post date:** [January 12, 2012, 7:11pm UTC](https://forum.inductiveautomation.com/t/write-variable-when-user-change-value-in-hmi/3854/1 "2012-01-12T19:11:22Z")

</div>

hi

I have to transform my “read only driver” to “read write driver”.  
That is, I wrote a driver, that reads variable from a custom tcp protocol, and puts the  
values inside the node map “((DataNode) node).setValue(inVar.getValue());” I used the  
weather sample as model, so I extends NodeMapDriver and on connect method I refresh the  
vars values.

Now the variables have to be ReadWrite so, when the user change the value on HMI I have to  
write the change on tcp.

The question is, can the driver be notified when the user change a variable value?

Thanks,  
Stefano

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 12, 2012, 10:38pm UTC](https://forum.inductiveautomation.com/t/write-variable-when-user-change-value-in-hmi/3854/2 "2012-01-12T22:38:37Z")

</div>

If you’re using NodeMapDriver the easiest thing to do is probably to override the call to createWriteRequest(List\<? extends Writeitem\>) and return your own Request object that implements your write logic.
