Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

243
Vistas
getting an element value from array in agilepoint

I'm using Agilepoint to build a form. in this form I have a multiselect control, from which I need to let the user choose several items, to later insert them into a list. what I'm trying to do is that after the user chooses the item she needs, I run a script that loops through the array in the control, and each selected item is saved in a different field, then I use OOTB tools to insert it to the list.

I managed to write a script that loops and identifies the selected items, but for some reason it saves only the last item value to the different field mentioned before.

using the developers tools, it seems like the script is running correctly. seeing that the last value has been saved to the different field, I see no problem in saving the value there. Moreover - the script does activate something out of the field - after the console log in the middle is a script to add a row to the list mentioned before - and it create the right number of rows.

Any help would be appreciated.

this is the code

    function CheckItem(){
var Item = document.getElementById("ResponsibleInchargeFinalMultiple");
var Len = Item.length;
var TempField = document.getElementById("TempUserForMail").value;
var i = 0
for (var i = 0; i < Len; i++){
    if (Item[i].selected){
    var ItemValue = Item[i].value;
    document.getElementById("TempUserForMail").value = ItemValue;
    console.log(ItemValue);
alert(ItemValue);
var options = {};
options. fieldId = 'UserstoRead';  
options.value = [{}];
eFormHelper.addRowsToSubForm(options, function (result) 
  {
  if (result.isSuccess) 
    {
    console.log(result.data); //logs the data holds the empty object
    }
  else 
    {
    console.log(result.error); // logs the hold exception object 
    }
    
});
};
};
}

thanks!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda