Formularios, guardar datos de un select

1
0
-1

Buenas tardes, tengo una duda, tengo un select el cual esta mostrando los datos por assets de tipo javascript. Mi problema es que quiero guardar en una variable de proceso de bonita la seleccion que hicieron en el SELECT y no logro hacerlo ya que en valor tengo la variable que muestra las opciones. Que podria hacer?

Comments

Submitted by Sean McP on Mon, 04/24/2017 - 23:12

¿Qué versión de Bonitasoft?

Submitted by vavargas.12 on Mon, 04/24/2017 - 23:14

7.4.3

Submitted by vavargas.12 on Mon, 04/24/2017 - 23:14

7.4.3

1 answer

1
+1
-1
This one is the BEST answer!

Google-Translate to English:

I have a select which is showing the data by JavaScript type assets. My problem is that I want to save in a nice process variable the selection they made in SELECT and I do not manage to do it since in value I have the variable that shows the options. What could I do?

Have you defined a Contract element for the return? If not then you must do that first. Without it you cannot return anything. Call it contractSelectedElement

You should have a variable in the form for the selected Value - call it selectedValue. In the SELECT parameters change Value to the variable selectedValue.

You then have to change the formOutput variable to return the variable selectedValue. Something like:

return {
        'contractSelectedElement': $data.selectedValue
};

regards
Seán

PS: As this reply offers an answer your question, and if you like it, please Mark UP and/or as Resolved.

Google-Traducir- al español:

¿Ha definido un elemento de contrato para la devolución? Si no, entonces usted debe hacer eso primero. Sin ella no puedes devolver nada. Llámelo contractSelectedElement

Debe tener una variable en el formulario para el valor seleccionado: llámela selectedValue. En los parámetros SELECT cambie el valor a la variable selectedValue.

A continuación, debe cambiar la variable formOutput para devolver la variable selectedValue. Algo como:

return {
        'contractSelectedElement': $data.selectedValue
};

Eso le llevará en el camino correcto para devolver el valor seleccionado ... Juegue con él y lo obtendrá.

Saludos
Seán

PS: Como esta respuesta ofrece una respuesta a su pregunta, y si le gusta, por favor marque UP y / o como se resuelve.

Comments

Submitted by vavargas.12 on Tue, 04/25/2017 - 16:35

Thanks!

Notifications