Pass main for loop index in sub for loop

Hi,

I have requirement to pass the main forEach index in second sub forEach.

like i highlighted fv!index from main loop and that  highlighted fv!index want in second sub loop in the place of  highlighted ri!SID_QuesIndex_RI text.

so how can i do this.

contents: {
    a!forEach(
    items: local!items,
    expression: {
    a!textField(
    label: "Question " & fv!index,
   value: fv!item.QuestionText,
   saveInto: {
      ri!SID_reviewQ_RI[fv!index].QuestionText,
     a!save(ri!SID_QuesIndex_RI,fv!index)
   },
  labelPosition: "ADJACENT"
  ),


  a!forEach(
  items: fv!item.RevAnsCDT,
  expression: {
     a!textField(
     label: "Option " & fv!index ,
     value: fv!item.AnsText,
     saveInto: ri!SID_reviewQ_RI.RevAnsCDT[fv!index].AnsText,
     align: "LEFT",
    labelPosition: "ADJACENT"
    ),
    a!integerField(
   label: "Weightage " & fv!index,
   value: fv!item.Weightage, 
   saveInto: ri!SID_reviewQ_RI[ri!SID_QuesIndex_RI].RevAnsCDT[fv!index].Weightage,
   align: "LEFT",
   labelPosition: "ADJACENT"

    )
 }
)
}
)
}

Parents Reply Children
No Data

 Discussion posts and replies are publicly visible