# How can I use external sql content as a selection list in an application form?

**URL:** <https://community.ofelia.com/t/how-can-i-use-external-sql-content-as-a-selection-list-in-an-application-form/11120>\
**Category:** Q&A\
**Created:** [11 March 2022 13:17 UTC](https://community.ofelia.com/t/how-can-i-use-external-sql-content-as-a-selection-list-in-an-application-form/11120 "2022-03-11T13:17:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgl](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/bgl/32/1439_2.png) [@bgl](https://community.ofelia.com/u/bgl)\
**Post date:** [11 March 2022 13:17 UTC](https://community.ofelia.com/t/how-can-i-use-external-sql-content-as-a-selection-list-in-an-application-form/11120/1 "2022-03-11T13:17:53Z")

</div>

Hello everyone,  
I am trying to read values from a ms sql / postgres sql database to be able to use them directly in a form as a selection list in an application.  
Currently we are running as POC a Bonita community 2021.2 environment with a postgres sql db.  
I have also already found a similar requirement in the Bonita community.

http://community.ofelia.com/questions-and-answers/how-do-you-display-business-variable-list-containing-sql-data-ui-table-widget

It's seems, that the solution approach, which is described at

https://github.com/Bonitasoft-Community/rest-api-sql-data-source

is only implementable for an older Bonita version. At least the documentation is created for Bonita 7.8.4 and is dated May 14, 2019.

When I try to import the application.xml, as described in the documentation, I get an error "Can't import Application".

Furthermore is a warning in the engine log:  
WARNING [http-nio-8080-exec-3] org.bonitasoft.engine.api.impl.ServerAPIImpl.checkMethodAccessibility The API method org.bonitasoft.engine.api.TenantAdministrationAPI.installBusinessDataModel is deprecated. It will be deleted in a future release. Please plan to update your code to use the replacement method instead. Check the Javadoc for more details.

Is there a better/updated solution for Bonita \>= 2021.2 to use selection fields in application forms with external sql-content (ms sql/ postgres sql)?

&nbsp;

Many greetings

Bodo

---

<div class="post-metadata">

**Author:** ![nasrin788\_1384620](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@nasrin788\_1384620](https://community.ofelia.com/u/nasrin788_1384620)\
**Post date:** [12 March 2022 07:13 UTC](https://community.ofelia.com/t/how-can-i-use-external-sql-content-as-a-selection-list-in-an-application-form/11120/2 "2022-03-12T07:13:41Z")

</div>

Hi,

Did you try **select widget** in UI Designer? you can get data from database using RestAPI and show them in select using this widget.

---

<div class="post-metadata">

**Author:** ![bgl](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/bgl/32/1439_2.png) [@bgl](https://community.ofelia.com/u/bgl)\
**Post date:** [14 March 2022 09:04 UTC](https://community.ofelia.com/t/how-can-i-use-external-sql-content-as-a-selection-list-in-an-application-form/11120/3 "2022-03-14T09:04:07Z")

</div>

Hello,  
does this then work via the RestAPI extensions?  
I don't have any other idea how to take the values from the external DB source and pass them to a selection field.

Many greetings  
bgl
