# Assign a process variable in a REST API variable in the UI Designer, is it possible?

**URL:** <https://community.ofelia.com/t/assign-a-process-variable-in-a-rest-api-variable-in-the-ui-designer-is-it-possible/8452>\
**Category:** Q&A\
**Created:** [8 May 2017 14:33 UTC](https://community.ofelia.com/t/assign-a-process-variable-in-a-rest-api-variable-in-the-ui-designer-is-it-possible/8452 "2017-05-08T14:33:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![romualdo.s.rs](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@romualdo.s.rs](https://community.ofelia.com/u/romualdo.s.rs)\
**Post date:** [8 May 2017 14:33 UTC](https://community.ofelia.com/t/assign-a-process-variable-in-a-rest-api-variable-in-the-ui-designer-is-it-possible/8452/1 "2017-05-08T14:33:47Z")

</div>

I have a login screen where according to the user that is logging I need to display only the companies that he / she attends, I was able to assign to a process variable the respective company code to the user who accessed the system and I have a BDM where all the Registered companies are already available to be displayed in the UI Designer but I do not know how to display the companies that have the same code as the user that is accessing, so I thought of creating a API REST variable that would only return companies with the same code , But I can not put a process variable in this query, is it possible?

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [8 May 2017 20:30 UTC](https://community.ofelia.com/t/assign-a-process-variable-in-a-rest-api-variable-in-the-ui-designer-is-it-possible/8452/2 "2017-05-08T20:30:48Z")

</div>

No, but you may find it easier to write a Custom REST API for this case.

See here: [http://documentation.bonitasoft.com/?page=rest-api-extensions](http://documentation.bonitasoft.com/?page=rest-api-extensions)

This refers to Subscription but if you export a REST extension you should be able to develop your own for Community.

regards  
Seán

_PS: While this may not be the complete answer you’re hoping for, it does indicate a possible solution, please mark as resolved._

---

<div class="post-metadata">

**Author:** ![romualdo.s.rs](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@romualdo.s.rs](https://community.ofelia.com/u/romualdo.s.rs)\
**Post date:** [9 May 2017 20:06 UTC](https://community.ofelia.com/t/assign-a-process-variable-in-a-rest-api-variable-in-the-ui-designer-is-it-possible/8452/3 "2017-05-09T20:06:02Z")

</div>

But in this example he has in the forum he was able to display the contents of a process variable (In array format) in UI Designer:

[http://community.ofelia.com/questions-and-answers/how-add-process-variable-ui-designer-form-bonita-7](http://community.ofelia.com/questions-and-answers/how-add-process-variable-ui-designer-form-bonita-7)

But I did not understand how he managed to do this
