widget select

Hi,

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

Regards

1 Like

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

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

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?