Form - CHECKBOX全选功能

时间:2024-04-24 14:06:13

FORM BUILDER开发,遇到这样一个需求:
添加一个CHECKBOX完成全选功能,红框为新添加的CHECKBOX(如图示)

Form - CHECKBOX全选功能

Try to use APP_RECORD.FOR_ALL_RECORDS
ex:Soure Block:TEST  Soure Item:CHECK(is a Checkbox Item)
1、BLOCK:CONTROL(Non Database Data Block) Add a Checkbox Item(Item Name:ALL_CHECK)
2、CONTROL.ALL_CHECK add Trigger(Item Level) -- WHEN-CHECKBOXBOX-CHANGED
     ---------------------------------------------------------------------------
     BEGIN
        APP_RECORD.FOR_ALL_RECORDS ('TEST'                 --Source Block
                                                           ,'ALL_CHECK'       --Source Block Trigger
                                                          );
     END;
     ---------------------------------------------------------------------------
3、Block:TEST  add User-define Trigger(Block Level), Trigger Name:ALL_CHECK
     ---------------------------------------------------------------------------
     BEGIN
         IF :CONTROL.ALL_CHECK = 'Y' THEN
           :TEST.CHECK = 'Y';
         ELSE
            :TEST.CHECK = 'N';
         END IF;
     END;
     ---------------------------------------------------------------------------