# Save dashboard layout for users individually

**URL:** <https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 14, 2022, 1:12pm UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229 "2022-10-14T13:12:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klaus\_Reckefuss](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Klaus\_Reckefuss](https://forum.inductiveautomation.com/u/Klaus_Reckefuss)\
**Post date:** [October 14, 2022, 1:12pm UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229/1 "2022-10-14T13:12:09Z")

</div>

Is it possible to save dashboard layout for users individually. It seems the layout of the dashboard is saved global on the gateway

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [October 14, 2022, 2:18pm UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229/2 "2022-10-14T14:18:41Z")

</div>

I don't think you can do it automatically. You can, however, save the value of the `widgets` property to a database for each user and load that specific configuration when that user is logged in. You may also need to keep a copy of `availableWidgets` if that is going to vary between users.

[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Dashboard](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Dashboard)

---

<div class="post-metadata">

**Author:** ![j.israelsen](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@j.israelsen](https://forum.inductiveautomation.com/u/j.israelsen)\
**Post date:** [October 14, 2022, 8:49pm UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229/3 "2022-10-14T20:49:18Z")

</div>

Building on specifics for what @zacht mentioned:

- To save to the database you will need to get it into a specific format, here is a sample where the data gets prepped for storing in a database:

```auto
	#Import libraries
	from com.inductiveautomation.ignition.common import TypeUtilities

	#Get current widgets and settings
	widgets = {}
	widgets = self.getSibling("Dashboard").props.widgets

	#Convert widget for storage
	widget_save = str(TypeUtilities.pyToGson(widgets))

```

- Similarly once you query your database to restore your information you will need to convert it back, here is another sample:

```auto
    #Import Libraries
	import copy
	
	#Get data from query out
	pyData = system.dataset.toPyDataSet(queryResult)
	widgets = pyData[0]
	
	#Decode object to be used for the widgets
	self.props.widgets = copy.deepcopy(system.util.jsonDecode(str(widgets[0])))

```

---

<div class="post-metadata">

**Author:** ![Klaus\_Reckefuss](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Klaus\_Reckefuss](https://forum.inductiveautomation.com/u/Klaus_Reckefuss)\
**Post date:** [October 17, 2022, 6:41am UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229/4 "2022-10-17T06:41:29Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 2, 2022, 2:39pm UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229/6 "2022-11-02T14:39:52Z")

</div>

There is also now a free module [Ignition Extensions](https://forum.inductiveautomation.com/t/ignition-extensions-convenience-utilities-for-advanced-users/64615), which among other awesome features provides a `system.util.deepcopy()` which correctly deep copies objects with out the need to jsonDecode.

---

<div class="post-metadata">

**Author:** ![j.israelsen](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@j.israelsen](https://forum.inductiveautomation.com/u/j.israelsen)\
**Post date:** [November 2, 2022, 2:46pm UTC](https://forum.inductiveautomation.com/t/save-dashboard-layout-for-users-individually/65229/7 "2022-11-02T14:46:56Z")

</div>

Cool, I didn't know about this. Thanks! I've been waiting for a proper deepcopy function.
