load( local!cdtForm1:rule!getForm1Details(ri!iRequestID), a!formLayout( firstColumnContents:{ a!textField( value:1+enumerate(count(local!cdtForm1)) ), a!applyComponents( rule!TestGrid( ri!cdtForm1,_),1+enumerate(count(local!cdtForm1)) ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidgetSubmit( label: "Submit", style: "PRIMARY", saveInto: { a!save( ri!cdtTargetLocation, apply( rule!FormatCDTForm(Index:_,MyCDT:local!cdtForm1), (1+enumerate(count(local!cdtForm1))) ) ) } ) } ) ) ) /*NOTE:- ---- cdtForm1 is the cdtForm1 contains the deatils selected in teh first form, ---- cdtTargetLocation is the cdt where I want to store the current grid data */ /* Create another rule "FormatCDTForm" defination */ with( type!MyCDT( tAdvYear1:ri!MyCDT[ri!Index].tAdvYear1, tAdvYear2:ri!MyCDT[ri!Index].tAdvYear2, tAdvYear3:ri!MyCDT[ri!Index].tAdvYear3, tAdvYear4:ri!MyCDT[ri!Index].tAdvYear4, tAdvYear5:ri!MyCDT[ri!Index].tAdvYear5, tOIYear1:ri!MyCDT[ri!Index].tOIYear1, tOIYear2:ri!MyCDT[ri!Index].tOIYear2, tOIYear3:ri!MyCDT[ri!Index].tOIYear3, tOIYear4:ri!MyCDT[ri!Index].tOIYear4, tOIYear5:ri!MyCDT[ri!Index].tOIYear5, tRevYear1:ri!MyCDT[ri!Index].tRevYear1 /* And soon*/ ) )