處理表格形式

釋出表格形式時,每個記錄中的專案可通過“APEX_APPLICATION.G_Fnn”陣列用於 PL / SQL 程式碼。G_F01 對應於第一個可編輯列,G_F02 對應於第二個,依此類推。例如,你可以遍歷每個記錄並訪問每個欄位的已釋出值,如下所示:

FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP 
  htp.p('Column A row '||I||' has a value of '||APEX_APPLICATION.G_F01(i)); 
  htp.p('Column B row '||I||' has a value of '||APEX_APPLICATION.G_F02(i)); 
END LOOP;

如果第一列是核取方塊,則只有已選中的核取方塊才會在陣列中包含一個條目:

FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP 
  htp.p('Checkbox on row '||APEX_APPLICATION.G_F01(i)||' was checked');
  htp.p('Column B on that row has a value of '
        ||APEX_APPLICATION.G_F02(APEX_APPLICATION.G_F01(i))); 
END LOOP;