PC : PeopleCode for disable the row delete option in scroll and grid



PeopleCode for disable the row delete option in scroll and grid


For &i = 1 To &Asmfloor.ActiveRowCount
   &Asmwing = &Asmfloor(&i).GetRowset(Scroll.ASM_WING_TBL);

   For &j = 1 To &Asmwing.ActiveRowCount
      &Asmcabin = &Asmwing(&j).GetRowset(Scroll.ASM_CABIN_TBL);
   
      If &Asmcabin.ActiveRowCount = 1 Then
         &Asmwing.DeleteEnabled = True; /* to enable the row delete option */

         If &Asmwing.ActiveRowCount = 1 Then
            &Asmfloor.DeleteEnabled = True;
         Else
            &Asmfloor.DeleteEnabled = False; /* to disable the row delete option */
         End-If;
         rem &Asmfloor.DeleteEnabled = True;

      Else
         &Asmwing.DeleteEnabled = False;
         &Asmfloor.DeleteEnabled = False;
     
      End-If;
   
   End-For; /* end-of wing */
           
End-For; /* end-of floor */

Comments

Popular posts from this blog

BI Publisher: If Condition with sub-string in rtf template