Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to joaoc1131

    I'm guessing the issue you're facing is in your a!forEach() statement at the bottom here.  When you reference ri!recordCandidateSkills[fv!index], Appian can be finnicky about addressing an index in an array that does not [yet] exist.  What you should do instead is think of this in terms of assembling the entire array you want ri!recordCandidateSkills to contain, and saving the whole assembled thing all at once.  I'll attempt to freehand what i'd suggest you re-write it as, though this might need further refining:

    a!save(
      ri!recordCandidateSkills,
      
      if(  /* note, this is somewhat unnecessary as a!forEach returns an empty set in this case anyway */
        a!isNullOrEmpty(local!skill),
        {},
        
        a!forEach(
          local!skill,
          fv!item.idSkill
        )
      )
    )

Children