I can't Access to a specific fields values located in a Subform with JS
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.

