# Use process variable as key for BDM retrieval

**URL:** <https://community.ofelia.com/t/use-process-variable-as-key-for-bdm-retrieval/11538>\
**Category:** Q&A\
**Tags:** bonita-studio\
**Created:** [24 April 2023 09:27 UTC](https://community.ofelia.com/t/use-process-variable-as-key-for-bdm-retrieval/11538 "2023-04-24T09:27:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_dev](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@chris\_dev](https://community.ofelia.com/u/chris_dev)\
**Post date:** [24 April 2023 09:27 UTC](https://community.ofelia.com/t/use-process-variable-as-key-for-bdm-retrieval/11538/1 "2023-04-24T09:27:57Z")

</div>

I created a process variable (e.g. recordKey,&nbsp;type long)to handle the persistenceId&nbsp;i selected from a previous task (via data table row selection). I wanted to use it for data retrieval unde&nbsp;business variable default value.&nbsp;  
Unfortunately, i can't use it in the Business Queries' findByPersistenceId.  
Is there any other way to utilize the process variable for data retrieval?

---

<div class="post-metadata">

**Author:** ![chris\_dev](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@chris\_dev](https://community.ofelia.com/u/chris_dev)\
**Post date:** [25 April 2023 06:58 UTC](https://community.ofelia.com/t/use-process-variable-as-key-for-bdm-retrieval/11538/2 "2023-04-25T06:58:33Z")

</div>

I found the solution. To retrieve the data, you need an additional task action (e.g.&nbsp;service task) to perform the data retrieval using the process variable as key before passing it&nbsp;to human task and form.
