# Is persistent the setting I need

**URL:** <https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 25, 2023, 8:19pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992 "2023-10-25T20:19:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [October 25, 2023, 8:19pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992/1 "2023-10-25T20:19:13Z")

</div>

Hi everyone,

Looking to get some clarity if this is the setting I need.

Basically I have a toggle switch. If I toggle it and go to a different screen and come back I want that toggle to stay where it is at. I tried going through the manual and it mentions persistence so I checked the selected property and sure enough it is selected but it does not save. Should I be looking at another setting?

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [October 25, 2023, 8:29pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992/2 "2023-10-25T20:29:16Z")

</div>

You need to bi-directionally bind the value to a session custom prop. That should keep it across page views.

---

<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:** [October 25, 2023, 8:42pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992/3 "2023-10-25T20:42:19Z")

</div>

> [@scadafan](#):
>
> If I toggle it and go to a different screen and come back I want that toggle to stay where it is at.

To expand on what @bschroeder has already mentioned, what you're describing is the idea of a component maintaining its state during the life of a session; going to a different screen (View OR Page) results in that screen being removed from the session registry, and a new instance being added when you then later come back to the original screen. By placing a property at the session level and using this Toggle Switch to set that property through a bi-directional binding, the Toggle Switch will both set and reflect the value of that property.

Now, _Persistent_ is a binding setting - configured within the Designer - which dictates what value the component loads with on startup. When you place bindings, you'll notice they have Persistent turned off by default. This is because the most common use-case is that you want the component to evaluate its binding before showing a value. If Persistent were enabled, then the component would render with whatever is saved in the Designer _while the binding might still be evaluating in the background_ resulting in "thrash", where components load in one state and then visibly swap to another state (or value).

---

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [October 25, 2023, 9:09pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992/4 "2023-10-25T21:09:42Z")

</div>

Oh ok yea that is what I need. Thank you both!

So to understand this correctly _Persistent_ is what value to pull at session start either what is in the designer or evaluate it as its happening when starting up?

While this session custom tag is what is used when creating something that will clear to default after the session ends?

And just to make sure there is no way to do this with persistent?

---

<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:** [October 25, 2023, 9:14pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992/5 "2023-10-25T21:14:11Z")

</div>

> [@scadafan](#):
>
> So to understand this correctly _Persistent_ is what value to pull at session start either what is in the designer or evaluate it as its happening when starting up?

Not quite. It's what value to **display** while the binding value is being retrieved or calculated.

> [@scadafan](#):
>
> While this session custom tag is what is used when creating something that will **clear to default** after the session ends?

Not quite. When the session ends the session variables are erased - gone - they don't exist - not to be found - anywhere. The browser frees up the memory they were consuming. Something that doesn't exist doesn't have a default value.

---

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [October 25, 2023, 9:42pm UTC](https://forum.inductiveautomation.com/t/is-persistent-the-setting-i-need/80992/6 "2023-10-25T21:42:31Z")

</div>

Oh ok that makes sense thank you
