> For the complete documentation index, see [llms.txt](https://docs.cloudio.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudio.io/creating-datasources/working-with-datasources/creating-a-data-source/defining-a-post-query/passing-data-from-pre-query-to-post-query.md).

# Passing data from pre-query to post query

To store a parameter value at the session level and then re-use it in a pre-query, post-query or server side validation script; use the following methods:

* To set the data at the session level,

```
db.setSessionData(key, value);
```

* To retrieve the stored value from the pre query/post query/server-side validation script,

```
db.getSessionData(key);
OR
db.removeSessionData(key);
```
