# Views lose 'memory' when sent to another route

**URL:** <https://forum.inductiveautomation.com/t/views-lose-memory-when-sent-to-another-route/92633>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 1, 2024, 3:23pm UTC](https://forum.inductiveautomation.com/t/views-lose-memory-when-sent-to-another-route/92633 "2024-07-01T15:23:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Breeding](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Matthew\_Breeding](https://forum.inductiveautomation.com/u/Matthew_Breeding)\
**Post date:** [July 1, 2024, 3:23pm UTC](https://forum.inductiveautomation.com/t/views-lose-memory-when-sent-to-another-route/92633/1 "2024-07-01T15:23:21Z")

</div>

Hey you all!  
I am making an input form on ignition but I am having an issue to where if I go to another route (/Areas in this instance) from another route (/Worksheet). I lose all the data I have inputted in the /Worksheet view. I have tried to store the data in session custom and have a message handler that updates parameters on edit. Nothing seems to work. I basically need the data in the tables I have in there to retain even if I direct to another route. Ill provide some context below.

\*\*Worksheet view

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/0/00da92189e7d2bc2ed9ce6eb188c7acf9e691a39.png)  
\*\*click area Route  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/f/cf7c2e151d0419b6b34bea82adb9531c5e9fe74e.png)  
\*\*come back to worksheet  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e919cde8eb2ee228750a258b3c817782b08edd4c.png)

How my worksheet view is handled is a template(custom component) that I input multiple times with different parameters( column names, isEditable, size etc.) so there are multiple of these templates. I have tried to update the parameters on edit and that seems to work if your still on the same route but once you go to another route it loses all the data the user has inputted. I have also tried setting custom session props and sending the data via that but that also does not work.

Any help or link to documentation would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![simeonw](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@simeonw](https://forum.inductiveautomation.com/u/simeonw)\
**Post date:** [July 1, 2024, 11:31pm UTC](https://forum.inductiveautomation.com/t/views-lose-memory-when-sent-to-another-route/92633/2 "2024-07-01T23:31:36Z")

</div>

Hi Matthew,

Using the custom session props does indeed sound like a good solution for your application, especially if you want the data to persist within the current session, but not across all sessions.

Without seeing your view configurations or scripting, it is hard to tell where the issue might be. However, it sounds like the data is either not being written to the custom session props, is bring overwritten, or the data from the session props is not being passed down to your view correctly.

Here are a few things to consider:

**Table Edits**  
If you are dealing with tables, make sure you are updating the _ **data** _ prop accordingly, after the user edits a cell. They have a good example of this here:

> **[Perspective - Table Scripting | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table/perspective-table-scripting#oneditcellcommit)**
>
> This page details the various scripting, component, and extension functions available for Perspective's Table component.

**Embedded View Parameters**  
Where you are passing data down to an embedded view using parameters and you want to pass changes back up to the parent view, make sure you have configured your view parameter(s) as input-output.

> **[Views in Perspective | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/views-in-perspective#inputoutput-parameters)**
>
> Perspective views are unique in that they can act as both a top level screen (taking up a whole page in your session) or a component (embedded in another view). Each view is a project resource, which are named and organized into folders in the...

Also, ensure that any bindings on these parameters are configured as bi-directional.

> **[Property Binding | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/7.9/visualization-and-dashboards/property-binding-types/property-binding)**
>
> Property to Property Binding

**Suggestions**  
Message handlers definitely have their place, but where possible, try to pass data to/from your embedded views using parameters, or write directly to the custom session props from within the embedded view.

**Troubleshooting**

- If you are writing to a custom session prop, throw a label on the parent view (/Areas), bind the session prop to it and confirm that when you edit a table, that the custom session prop is indeed updating.
- Use the console and gateway logs to debug each point where data is being read/modified (i.e. when a user edits a cell, when you write to a session prop).

> **[system.perspective.print | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-print)**
>
> Prints the supplied message to the local console or the gateway logs, as appropriate.

> **[system.util.getLogger | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-getLogger)**
>
> Returns a Logger object that can be used to log messages to the console.
