Dropdown list with data from external DB in Bonita BPM Community
I would like to configure dropdown list widget in form that list data from external DB. As I am using Bonita BPM Community it is not possible to use connectors in forms. As I understand the only option to retrieve data in this case is to write a groovy script that will query data from DB for this widget. Is it correct? Or are there any other options?
Ah the noobie wants to learn,
Go forth grasshopper and search the world...experiment...it's a wonderful thing, or when all else fails go on a course.... :) If you don't know about grasshopper you've missed out, though I'm not sure he was ever called that in the TV series.
Sorry, it's late, and EuroVision will be won tomorrow by the Aussies', what is the world coming too?
Right to get the selected item,
First create a Pool variable of type String, called it selectedItem (or whatever).
On the application form, click the selection list, click on the Detail->Data Tab and in Output Operation
on the LHS select the variable selectedItem and on the RHS select the form field field_whateveritscalledontheform.
That's it, done, when the user selects the item from the list the selected item will appear in the pool variable selectedItem.
Hope that helps, regards
It's that simple ) Thank you!
No, not in community, well I haven't sen any other way of doing it.
The way to do it is create a script connector to get the data and save it to a list variable, then use the list variable as the data to the drop down list.
I actually prefer this as it keeps the manipulation of data away from the presentation of data. And you can see the step on the diagram... :)
Having hidden scripts on a form may be useful but is a real PITA when trying to debug something.
Hi, Sean. Thank you for your answer. I have just began study Java. Could you please give me a hint which classes shall be used in this script?
Hi, Sean. Thank you for the detailed guide. It works! And I immediately have faced with another issue. How to put a selected value from drop down menu into new variable in order to use it further in the process? I tried to play around with variables. What I could do - just to put the whole list from List variable into another List variable. Feel stupid)
Thank you for advising stackoverflow.com. There are tons of educational materials on Java. I tried some courses on Lynda.com, but I don't like it. Maybe could you advice some book or resource on this topic?