widget select

1
+1
-1

Hi,

in Bonita 7, how to populate dynamically a select widget with list of values built depending on some conditions ?

Regards

Comments

Submitted by Sean McP on Tue, 09/08/2015 - 20:27

Dynamically?

So what you want to do is have an empty (or full) List which reduces or expands depending on things the user selects (Radio buttons or check boxes)?

The easiest way is probably Javascript with a bit of Ajax code to get the data from a database and repopulate the DDL.

regards

1 answer

1
0
-1

You can simply use a variable of type External API with a dynamic parameter in your URL to filter your results.
For example:

../API/bdm/businessData/com.company.model.Request?p=0&c=20&q=find&f=provider={{provider.id}}

Each time {{provider.id}} changes, the URL is called again and the data is refreshed.

If you require some more complex processing on the backend side, you could also use a custom REST API extension to perform your data manipulation.
For this more advanced option, have a look a the SQL datasource example here:
https://github.com/Bonitasoft-Community/rest-api-sql-data-source

Comments

Submitted by romualdo.s.rs on Wed, 06/07/2017 - 20:44

If I have two dropdowns, where the first country already is the second and the second is filled according to the country selected in the first, how can I do if, for example, it will have two lines, how to assign to each row the respective country of that line And then always display the correct content on each line?

Notifications