# Radio Group not updating database onClick

**URL:** <https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 10, 2024, 6:09am UTC](https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018 "2024-01-10T06:09:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [January 10, 2024, 6:09am UTC](https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018/1 "2024-01-10T06:09:28Z")

</div>

I have configured a radio group component in perspective, and bound the index to a database table. it works fine

now i tried to update the table when user clicks a radio button  
I have used the following script in the onClick event, but I cannot make it work

def runAction(self, event):  
params = {'site': self.session.custom.site , 'scenario' : self.session.custom.scenario, 'logId': "RouteLog" , "logLevel": 4 }  
system.db.runSFNamedQuery("F3/LogLevelUpdate", params )

any suggestions appreciated  
Thanks

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 10, 2024, 10:18am UTC](https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018/2 "2024-01-10T10:18:44Z")

</div>

Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). There's an edit (pencil icon) link below your question so you can fix it. Thanks.

You probably need to show us the named query configuration and explain how you know "it works fine". (How did you test it?)

Also, as a matter of interest, why not use [system.db.runNamedQuery - Ignition User Manual 8.0 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC80/system.db.runNamedQuery?src=sidebar)?

---

<div class="post-metadata">

**Author:** ![Mariano\_Alvarez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mariano_alvarez/32/35283_2.png) [@Mariano\_Alvarez](https://forum.inductiveautomation.com/u/Mariano_Alvarez)\
**Post date:** [January 10, 2024, 10:51am UTC](https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018/3 "2024-01-10T10:51:11Z")

</div>

You are populating a perspective table dynamically with the radio button?

is your event on the radio button? are you assigning the dataset of the named query to the table?

> [@jrd](#):
>
> def runAction(self, event):  
> params = {'site': self.session.custom.site , 'scenario' : self.session.custom.scenario, 'logId': "RouteLog" , "logLevel": 4 }  
> system.db.runSFNamedQuery("F3/LogLevelUpdate", params )

if I missunderstood it, you can also have a change script on the value property of the radio button to update the table

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 10, 2024, 2:33pm UTC](https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018/4 "2024-01-10T14:33:44Z")

</div>

Double-check your Gateway logs to verify there is no error when the script executes.

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [January 10, 2024, 8:56pm UTC](https://forum.inductiveautomation.com/t/radio-group-not-updating-database-onclick/84018/5 "2024-01-10T20:56:25Z")

</div>

sorry all  
my error  
i had a error in the parameter names
