# Perspective dashboard widget prop resetting parameters to default

**URL:** <https://forum.inductiveautomation.com/t/perspective-dashboard-widget-prop-resetting-parameters-to-default/66820>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [November 22, 2022, 6:51pm UTC](https://forum.inductiveautomation.com/t/perspective-dashboard-widget-prop-resetting-parameters-to-default/66820 "2022-11-22T18:51:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isaac\_Hodgkins](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Isaac\_Hodgkins](https://forum.inductiveautomation.com/u/Isaac_Hodgkins)\
**Post date:** [November 22, 2022, 6:51pm UTC](https://forum.inductiveautomation.com/t/perspective-dashboard-widget-prop-resetting-parameters-to-default/66820/1 "2022-11-22T18:51:42Z")

</div>

I'm experiencing some strange behavior when sending JSON data to the widgets prop of the dashboard component.

In the below screenshot you can see a custom value I have called json.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/b/4b68bcf1953cdccc8c9a8898713b9a9a010176fb.png)  
It contains the following string.

```auto
[{"isConfigurable":true,"name":"Label","header":{"style":{"classes":""},"title":"","enabled":false},"minSize":{"columnSpan":4,"rowSpan":2},"style":{"classes":""},"position":{"columnEnd":26,"columnStart":1,"rowStart":1,"rowEnd":8},"viewParams":{"configuring":true,"Label":"hello"},"body":{"style":{"classes":""}},"viewPath":"Widgets/Label"}]

```

I then run the following value change script that decodes the json and sends it to the widget, and also the custom array jsonDecode.

```auto
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
	json = system.util.jsonDecode(currentValue.value)
	self.custom.jsonDecode = json
	self.props.widgets = json

```

The widget's params are set to the default value of that widget, where jsonDecode has the correct parameter values.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/747cb86b7f6bc320502064db7cc353f7bf033d34.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/421871c62db031261def4762ac66ebc91b1627d0.png)

It seems that for some reason the widgets property is not accepting the given params and is then reseting them back to their default values. Any ideas on how I can fix this?

Thank you!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 22, 2022, 6:53pm UTC](https://forum.inductiveautomation.com/t/perspective-dashboard-widget-prop-resetting-parameters-to-default/66820/2 "2022-11-22T18:53:11Z")

</div>

Are the view params in question input (or bidirectional) params? Any errors in the gateway logs?

---

<div class="post-metadata">

**Author:** ![Isaac\_Hodgkins](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Isaac\_Hodgkins](https://forum.inductiveautomation.com/u/Isaac_Hodgkins)\
**Post date:** [November 22, 2022, 7:11pm UTC](https://forum.inductiveautomation.com/t/perspective-dashboard-widget-prop-resetting-parameters-to-default/66820/3 "2022-11-22T19:11:44Z")

</div>

No errors on the gateway logs.

The label param is set as bi directional.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/4/641642ced11db2b11c5a0ff29afd49e68ad01e6b.png)  
I tried setting it to input but that got rid of the parameter completely.

---

<div class="post-metadata">

**Author:** ![illank86](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@illank86](https://forum.inductiveautomation.com/u/illank86)\
**Post date:** [December 12, 2023, 1:02am UTC](https://forum.inductiveautomation.com/t/perspective-dashboard-widget-prop-resetting-parameters-to-default/66820/4 "2023-12-12T01:02:46Z")

</div>

i have this probelm as well, any idea ?
