Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

246
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda