Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi. it is hard to investigate on what is happening within your form without seeing the app/sample app.
However,
this KB have the exact requirement that you want Getting Value of Subform.
You can modify the code to adjust to your requirement of getting several other values and pass it to the set variable.
Cheers
I experts , I have a JS to get values from a subform but I have a problems to get values from a couple of fields.
In the chrome console I can see the value stored in the object, but I can't pass this value to a variable as the other values that I get from the same form.
This is the piece of code that I'm using
<script type="text/javascript">
$(document).ready(function(){
parcial = $("#sub1_ver_requisicion_aprov_parcial"); //Get subform value
console.log(parcial);
//console.log("Salida1: " + parcial.val());
console.log("Salida1: " + String(parcial["0"]["value"]));
nivel_apro = $("#sub1_ver_requisicion_nivel_de_aprovisionamiento"); //Get subform value
//#sub1_ver_requisicion_status
console.log(nivel_apro);
console.log(".val() : " + nivel_apro.val());
console.log("id : " + nivel_apro["0"]["id"]);
console.log("value: " + nivel_apro["0"].value);
estatus = $("#sub1_ver_requisicion_status"); //Get subform value
//#sub1_ver_requisicion_status
console.log(estatus);
console.log(".val(): " + estatus.val());
console.log("value brackets: " + estatus["0"]["value"]);
console.log("value: " + estatus["0"].value);
$(field7).val(nivel_apro["0"]["id"]); //Set field to value of subform
})
</script>
This is the value of the field in the subform
This is the outputs from the fields nivel_de_aprovisionamiento and status , the first one is a field type calculation and the second is a list box.