# A simple example of database (Postgresql?) query?

**URL:** <https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193>\
**Category:** Q&A\
**Created:** [6 February 2014 16:57 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193 "2014-02-06T16:57:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbbonita1](https://avatars.discourse-cdn.com/v4/letter/g/aeb1de/32.png) [@gbbonita1](https://community.ofelia.com/u/gbbonita1)\
**Post date:** [6 February 2014 16:57 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/1 "2014-02-06T16:57:39Z")

</div>

Hi,

I'm a newcomer to Bonitasoft tools and so far they are looking great. I'm consulting to a company in regards to new processes but one key issue for me - I need to store and retrieve data to/from a database in the organization.

This seems to be a simple task and I've seen the connectors area (which yields errors) and graphical query builder which I do not find anywhere. Youtube videos shows screens from older studio versions info on Bonita studio 6.2.1 which I've just downloaded and installed on my Linux.

Is there a simple guide or a video showing:

1. Connect to a database (Postgresql or MySql), retrieve values from a table, show them in a table in a form and/or use the values for multi-selection control?

2. Store a form data into a table in that external database?

Any help will be much appreciated; I'm pulling my hair here and losing time on the BonitaSoft evaluation for my customer...

&nbsp;

Thanks!

&nbsp;

---

<div class="post-metadata">

**Author:** ![dyum](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dyum](https://community.ofelia.com/u/dyum)\
**Post date:** [7 February 2014 13:39 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/2 "2014-02-07T13:39:57Z")

</div>

Are you going to use the Studio or just the API?

---

<div class="post-metadata">

**Author:** ![gbbonita1](https://avatars.discourse-cdn.com/v4/letter/g/aeb1de/32.png) [@gbbonita1](https://community.ofelia.com/u/gbbonita1)\
**Post date:** [7 February 2014 15:18 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/3 "2014-02-07T15:18:55Z")

</div>

I'm planning to use the Bonita Studio, and planning to use an existing connector within it (the one provided by Bonita - either for MySQL or for Postgres). I see that in 6.2.1 things has changed and those are different connectors (and different UI) compared to the previous 5.x versions and I was unable to retrieve the data (and store) from an external database.

I am looking to find out how to configure the connector and the variables in it to be able to retrive a value, a list, and update a record (row) at the end of the step/process. A simple process with the details or a HOWTO with samples will be great if anyone has that

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [11 February 2014 10:13 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/4 "2014-02-11T10:13:08Z")

</div>

This is more programming stuff (sql requests, use of variables) than Bonita related stuff, isn't it ? Maybe, you should have a look at our [Trello application example](http://community.ofelia.com/projects/trello-application-example-including-trello-connector).

---

<div class="post-metadata">

**Author:** ![gbbonita1](https://avatars.discourse-cdn.com/v4/letter/g/aeb1de/32.png) [@gbbonita1](https://community.ofelia.com/u/gbbonita1)\
**Post date:** [11 February 2014 17:00 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/5 "2014-02-11T17:00:49Z")

</div>

The issue is that when I'm checking the SQL / Programming part at Bonita (using the validation button) I do get all the results from the database.

However, when I try to select a variable to return the result back to Bonita - I cannot find a working solution. It will either won't allow me to select a variable OR it will allow me to select a variable but it will be empty or return an error.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [11 February 2014 17:06 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/6 "2014-02-11T17:06:20Z")

</div>

http://documentation.bonitasoft.com/initialize-variable-database-without-scripting-or-java-code ?

---

<div class="post-metadata">

**Author:** ![gbbonita1](https://avatars.discourse-cdn.com/v4/letter/g/aeb1de/32.png) [@gbbonita1](https://community.ofelia.com/u/gbbonita1)\
**Post date:** [11 February 2014 17:25 UTC](https://community.ofelia.com/t/a-simple-example-of-database-postgresql-query/4193/7 "2014-02-11T17:25:40Z")

</div>

Thanks for the reply ttonie.

Yes, I am aware of the graphical interface. I am strugling to select a variable that will show up in the pull-down menu of the last page of that wizard (where the wizard asks me to which variable to store results). I have variable types "Text (with many)" which I assume is a list, I tried java.util.list, I have tried single text value... non of the variable names shows in the pull-down menu.

To share a bit more about this problem, there is a post over here where I also shared screen shots of my problem. Please take a look at: http://community.ofelia.com/answers/issues-mysql-connector-config-output-values

Thanks.
