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
**click area Route

**come back to worksheet
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!
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:
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.
Also, ensure that any bindings on these parameters are configured as bi-directional.
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).