如何在 Oracle Apex 中循环 G_FXX where XX = (01,02..n)?

How to loop G_FXX where XX = (01,02..n) in Oracle Apex?

基本上我想要实现的是遍历 G_F0X 数组以使我的代码更紧凑而不使用例如:

APEX_APPLICATION.G_F01(1);
APEX_APPLICATION.G_F02(1);
APEX_APPLICATION.G_F03(1);

当然,它不起作用,但我无法在任何地方找到任何信息,而且我不知道该怎么做。

例如:

for counter in 1..3 loop
   APEX_APPLICATION.G_F0**{here comes the counter value}**(1);
end loop;

我不知道是否有更好的方法来执行此操作,但您可以创建一个数组并将 g_fXX 变量存储在其中。喜欢:

declare
  type t_vc_arr2 is table of apex_application_global.vc_arr2;
  g_fXX t_vc_arr2 := t_vc_arr2 (
                       apex_application.g_f01
                      ,apex_application.g_f02
                      ,apex_application.g_f03
                      --,apex_application.g_fXX
                     );
begin
  for i in 1 .. g_fXX.count loop -- loop through each apex_application.g_fXX array
    for j in 1 .. g_fXX(i).count loop -- loop through each value of current apex_application.g_fXX array
      dbms_output.put_line(g_fxx(i)(j));
    end loop;
  end loop;
end;
/