cancel
Showing results for 
Search instead for 
Did you mean: 

how to initialize dropdown

johnnylin
Champ in-the-making
Champ in-the-making
My process:  start –> service task –>user task–>end

We can use DelegateExecution.setVariable("myId","test") in service task. And in user task has input text with id "myId".  The input text will initialized with "test" value.

And my question is how to set a variable in service rask for dropdown?

Thanks a lot.
4 REPLIES 4

vasile_dirla
Star Contributor
Star Contributor
Hi, for populating the dropdown with a default value you have to do exactly the same you did for a simple text field but you have to set the "id" value to the variable not the label value.

ex: dropdown1 [{"v1", "Value 1"}, {"v2", "Value 2"}])

you have to set: execution.setVariable("dropdown1", "v2") -> and the ui will show "Value 2" as selected.

johnnylin
Champ in-the-making
Champ in-the-making
thanks for your reply. my question is how to set values for the dropdown options. e.g.dropdown1  [{"v1", "Value 1"}, {"v2", "Value 2"}]).
I notice that the function execution.setVariables(Map), but how to set the map values to dropdown1?

dilip_chenani
Champ in-the-making
Champ in-the-making
Do we have any solution for this query?

aoezlem
Champ in-the-making
Champ in-the-making

*push* 

I'm facing the same issue. Is any solution available?