# Slicer Scripted Module not calling updateParameterNodeFromGUI when UI is updated

**URL:** <https://discourse.slicer.org/t/slicer-scripted-module-not-calling-updateparameternodefromgui-when-ui-is-updated/20122>\
**Category:** Development\
**Tags:** scripted, gui\
**Created:** [October 12, 2021, 8:28pm UTC](https://discourse.slicer.org/t/slicer-scripted-module-not-calling-updateparameternodefromgui-when-ui-is-updated/20122 "2021-10-12T20:28:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsims](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tsims/32/11853_2.png) [@tsims](https://discourse.slicer.org/u/tsims)\
**Post date:** [October 12, 2021, 8:28pm UTC](https://discourse.slicer.org/t/slicer-scripted-module-not-calling-updateparameternodefromgui-when-ui-is-updated/20122/1 "2021-10-12T20:28:37Z")

</div>

Hi everyone,

I am working on python module for slicer and am running into a weird issue where my `updateParameterNodeFromGUI` function is not being called when I interacted with the UI. Is there a signal I may have broken somewhere in the module?

Any help on figuring out what is going on here would be greatly appreciated.  
Thanks!

---

<div class="post-metadata">

**Author:** ![ungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ungi/32/78573_2.png) [@ungi](https://discourse.slicer.org/u/ungi)\
**Post date:** [October 12, 2021, 10:04pm UTC](https://discourse.slicer.org/t/slicer-scripted-module-not-calling-updateparameternodefromgui-when-ui-is-updated/20122/2 "2021-10-12T22:04:05Z")

</div>

Can you see an error message in the Python interactor? Are you sure the signal and the slot functions are connected in the setup function of the widget class?

---

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [October 12, 2021, 10:06pm UTC](https://discourse.slicer.org/t/slicer-scripted-module-not-calling-updateparameternodefromgui-when-ui-is-updated/20122/3 "2021-10-12T22:06:36Z")

</div>

You need to connect each GUI element with the callback to updateParameterNodeFromGUI with lines like:

```auto
self.ui.myNodeSelectionWidget.connect("currentNodeChanged(vtkMRMLNode*)", self.updateParameterNodeFromGUI)

```

or

```auto
self.ui.myCheckBox.connect("toggled(bool)", self.updateParameterNodeFromGUI) 

```

in the setup() function of the widget class

---

<div class="post-metadata">

**Author:** ![tsims](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tsims/32/11853_2.png) [@tsims](https://discourse.slicer.org/u/tsims)\
**Post date:** [October 19, 2021, 7:38pm UTC](https://discourse.slicer.org/t/slicer-scripted-module-not-calling-updateparameternodefromgui-when-ui-is-updated/20122/4 "2021-10-19T19:38:09Z")

</div>

I can’t believe I overlooked something so obvious haha. This was the solution I forgot to add in my connections.

Thanks!
