Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

242
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!