1 2 Previous Next 21 Replies Latest reply: Dec 11, 2012 2:04 AM by Gus C RSS

    Tabular Form Not Working After Upgrade to 4.2

    Gus C
      I have upgraded an application from 3.2 to 4.2, but now when I try to save a tabular form I get an error message
      "ORA-01403: no data found"

      The code for my tabular form is
      select parameter parameter_hidden
            ,parameter
            ,value_char
            ,value_number
            ,value_date
            ,p.param_set param_set_hidden
            ,p.param_set
            ,param_type
            ,'#00CC00' BGCOLOUR 
      from etl_job_param p
      where p.system=:P230_SYSTEM
        and p.config=:P230_CONFIG
        and p.jobname=:P230_JOBNAME
        and p.param_set ='SUPPORT'
      And my page procedure for the update is
      declare
        v_count_failed     number := 0;
        v_count_updated    number := 0;
        v_count_failed2    number := 0;
        v_count_updated2   number := 0;
      begin
        for i in 1 .. apex_application.g_f01.COUNT loop
        --{
          if wwv_flow_item.md5(apex_application.g_f01(i)
                                 ,apex_application.g_f02(i)
                                 ,apex_application.g_f03(i)
                                 ,apex_application.g_f04(i)
                                 ,apex_application.g_f05(i))
          <> apex_application.g_fcs (i) then
            --{   
              p_sup_mnt_apx.pr_230_update_params(
                           :P230_SYSTEM
                                      ,:P230_CONFIG
                          ,:P230_JOBNAME
                          ,apex_application.g_f01 (i) -- pi_parameter
                          ,apex_application.g_f05 (i) -- pi_param_set
                          ,apex_application.g_f02 (i) -- pi_value_char
                          ,apex_application.g_f03 (i) -- pi_value_number
                          ,to_date(apex_application.g_f04 (i),'dd.mm.yyyy') -- pi_value_date  
                          ,apex_application.g_fcs (i) --pi_checksum 
                          ,v_count_failed
                          ,v_count_updated);
      
              v_count_failed2 := v_count_failed2 + v_count_failed;
              v_count_updated2 := v_count_updated2 + v_count_updated;
          
              --reset variables
              v_count_failed  := 0;
              v_count_updated   := 0;
          --}
          end if;
        --}
        end loop;
      
        :P230_COUNT_FAILED := v_count_failed2;
        :P230_COUNT_UPDATED := v_count_updated2;
      
      END;
      Any ideas ?

      Gus
        • 1. Re: Tabular Form Not Working After Upgrade to 4.2
          evrm
          Hi Gus,

          check to see if one of the apex_application.g_fxx is empty.

          regards,
          Erik-jan
          • 2. Re: Tabular Form Not Working After Upgrade to 4.2
            Gus C
            How do I do that ?

            Gus
            • 3. Re: Tabular Form Not Working After Upgrade to 4.2
              evrm
              Hi Gus,

              modify your code like this to see if any of your apex_application.g_fxx are empty/exists:
              declare
                v_count_failed     number := 0;
                v_count_updated    number := 0;
                v_count_failed2    number := 0;
                v_count_updated2   number := 0;
              
                t_arr varchar2(5);
                t_val varchar2(32767);
              begin
              
              t_arr := 'g_f01';
              t_val := apex_application.g_f01(1);
              t_arr := 'g_f02';
              t_val := apex_application.g_f02(1);
              t_arr := 'g_f03';
              t_val := apex_application.g_f03(1);
              t_arr := 'g_f04';
              t_val := apex_application.g_f04(1);
              t_arr := 'g_f05';
              t_val := apex_application.g_f05(1);
              
                for i in 1 .. apex_application.g_f01.COUNT loop
                --{
                  if wwv_flow_item.md5(apex_application.g_f01(i)
                                         ,apex_application.g_f02(i)
                                         ,apex_application.g_f03(i)
                                         ,apex_application.g_f04(i)
                                         ,apex_application.g_f05(i))
                   apex_application.g_fcs (i) then
                    --{   
                      p_sup_mnt_apx.pr_230_update_params(
                                   :P230_SYSTEM
                                              ,:P230_CONFIG
                                  ,:P230_JOBNAME
                                  ,apex_application.g_f01 (i) -- pi_parameter
                                  ,apex_application.g_f05 (i) -- pi_param_set
                                  ,apex_application.g_f02 (i) -- pi_value_char
                                  ,apex_application.g_f03 (i) -- pi_value_number
                                  ,to_date(apex_application.g_f04 (i),'dd.mm.yyyy') -- pi_value_date  
                                  ,apex_application.g_fcs (i) --pi_checksum 
                                  ,v_count_failed
                                  ,v_count_updated);
               
                      v_count_failed2 := v_count_failed2 + v_count_failed;
                      v_count_updated2 := v_count_updated2 + v_count_updated;
                  
                      --reset variables
                      v_count_failed  := 0;
                      v_count_updated   := 0;
                  --}
                  end if;
                --}
                end loop;
               
                :P230_COUNT_FAILED := v_count_failed2;
                :P230_COUNT_UPDATED := v_count_updated2;
              exception
                 when no_data_found
                 then
                    raise_application_error(-20000, nvl(t_arr, 'Unknown') || ' is empty/not present.');  
              END;
              regards,
              Erik-jan
              • 4. Re: Tabular Form Not Working After Upgrade to 4.2
                Gus C
                I get the error message

                ORA-20000: g_f05 is empty/no present.

                If I create a classic report with the same sql, then the column shows data.

                Gus
                • 5. Re: Tabular Form Not Working After Upgrade to 4.2
                  evrm
                  Hi Gus,

                  check the display type of the items.
                  It's possible that the fifth item (f05) is display only.

                  regards,
                  Erik-jan
                  • 6. Re: Tabular Form Not Working After Upgrade to 4.2
                    Gus C
                    No it is not display, it is a text field

                    Gus
                    • 7. Re: Tabular Form Not Working After Upgrade to 4.2
                      evrm
                      Hi Gus,

                      okay that's strange.
                      Seems like there are no f05 items in you HTML.
                      Can you check that?

                      regards,
                      Erik-jan
                      • 8. Re: Tabular Form Not Working After Upgrade to 4.2
                        Arie Geller
                        Hello Gus,

                        >> I have upgraded an application from 3.2 to 4.2, but now when I try to save a tabular form I get an error message "ORA-01403: no data found"

                        It is possible that while upgrading the application, the Tabular Form columns have been rearranged. It means that a column that used to be f05 is now allocated a different name, and as such populates into a different G_Fxx array. That is one of the reasons that APEX 4.1 introduced the option of manipulating the columns based on their name and not their corresponding G_Fxx array.

                        As Erik-jan suggested, you can verify it by looking into the page HTML code.

                        Regards,
                        Arie.

                        -------------------------------------------------------
                        &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

                        &diams; Author of Oracle Application Express 3.2 – The Essentials and More
                        • 9. Re: Tabular Form Not Working After Upgrade to 4.2
                          Gus C
                          I have inspected with firebug and cannot see a value for g_f05.
                          This is how my report is set up
                          select parameter parameter_hidden         -- text field, not shown
                                ,parameter                                     -- standard report column                        
                                ,value_char                                    -- text field
                                ,value_number                               -- text field
                                ,value_date                                   -- date picker classic
                                ,p.param_set param_set_hidden       -- text field, not shown
                                ,p.param_set                                 -- standard report column
                                ,param_type                                  -- standard report column
                                ,'#00CC00' BGCOLOUR                   -- standard report col
                          from etl_job_param p
                          where p.system=:P230_SYSTEM
                            and p.config=:P230_CONFIG
                            and p.jobname=:P230_JOBNAME
                            and p.param_set ='SUPPORT'
                          Any ideas ?

                          Gus
                          • 10. Re: Tabular Form Not Working After Upgrade to 4.2
                            evrm
                            Hi Gus,

                            I used your query to build a tabular form and generates the following HTML which I got from inspecting it with Firebug
                            <tr class="highlight-row">
                              <td class="data" headers="PARAMETER" style="">parameter</td>
                              <td class="data" headers="VALUE_CHAR" style="">
                                <label class="hideMe508" for="f02_0001">VALUE_CHAR</label>
                                <input id="f02_0001" type="text" value="value_char" maxlength="2000" size="15" name="f02">
                              </td>
                              <td class="data" headers="VALUE_NUMBER" style="">
                                <label class="hideMe508" for="f03_0001">VALUE_NUMBER</label>
                                <input id="f03_0001" type="text" value="value_number" maxlength="2000" size="15" name="f03">
                              </td>
                              <td class="data" headers="VALUE_DATE" style="">
                                <fieldset id="f04_0001_fieldset" class="datepicker">
                                <table id="f04_0001_holder" class="datepicker" cellspacing="0" cellpadding="0" border="0" summary="">
                                  <tbody>
                                    <tr>
                                      <td class="datepicker">
                                        <input id="f04_0001" type="text" value="" maxlength="2000" size="15" name="f04">
                                      </td>
                                      <td>
                                    </tr>
                                  </tbody>
                                </table>
                                </fieldset>
                              </td>
                              <td class="data" headers="PARAM_SET" style="">p.param_set</td>
                              <td class="data" headers="PARAM_TYPE" style="">param_type</td>
                              <td class="data" headers="BGCOLOUR" style="">#00CC00
                                <label class="hideMe508" for="f01_0001">PARAMETER_HIDDEN</label>
                                <input id="f01_0001" type="hidden" value="parameter" name="f01">
                                <label class="hideMe508" for="f05_0001">PARAM_SET_HIDDEN</label>
                                <input id="f05_0001" type="hidden" value="p.param_set" name="f05">
                              </td>
                            </tr>
                            based on your query I get the following output in firebug when using jQuery to get the tabular form columns.
                            $('input[name="f01"]')
                            [input#f01_0001 parameter]
                            
                            $('input[name="f02"]')
                            [input#f02_0001 value_char]
                            
                            $('input[name="f03"]')
                            [input#f03_0001 value_number]
                            
                            $('input[name="f04"]')
                            [input#f04_0001]
                            
                            $('input[name="f05"]')
                            [input#f05_0001 p.param_set]
                            Is the order of the columns in your tabular form the same as the order of the columns in the query?
                            Can you confirm you have the same structure in your HTML?

                            regards,
                            Erik-jan
                            • 11. Re: Tabular Form Not Working After Upgrade to 4.2
                              Gus C
                              The order seems to be the same.
                              This is my html
                              <tbody>
                              <tr>
                              <tr>
                              <td class="t15Body" valign="top" colspan="2">
                              <table width="100%" cellspacing="0" cellpadding="0" border="0" summary="">
                              <div id="report_1413820221901785_catch">
                              <table id="report_R1413820221901785" class="t15standard" summary="">
                              <tbody>
                              <tr>
                              <tr style="background-color:#00CC00;">
                              <td class="t15data" style="background-color:#00CC00;">ILOS</td>
                              <td class="t15data" style="background-color:#00CC00;">
                              <label class="hideMeButHearMe" for="f02_0001">Value Char#ROW_HEADER#</label>
                              <input id="f02_0001" type="text" value="-db ilos -RO -H A0000888.de.alpha.local -S hruilosirpl" maxlength="2000" size="15" name="f02">
                              </td>
                              <td class="t15data" style="background-color:#00CC00;">
                              <label class="hideMeButHearMe" for="f03_0001">Value Number#ROW_HEADER#</label>
                              <input id="f03_0001" type="text" value="45" maxlength="2000" size="15" name="f03">
                              </td>
                              <td class="t15data" style="background-color:#00CC00;">
                              <fieldset id="f04_0001_fieldset" class="datepicker">
                              <table id="f04_0001_holder" class="datepicker" cellspacing="0" cellpadding="0" border="0" summary="">
                              </fieldset>
                              </td>
                              <td class="t15data" style="background-color:#00CC00;">SUPPORT</td>
                              <td class="t15data" style="background-color:#00CC00;">
                              PROGRES
                              <input id="f01_0001" type="hidden" value="ILOS" name="f01">
                              <input id="f05_0001" type="hidden" value="SUPPORT" name="f05">
                              </td>
                              </tr>
                              <tr style="background-color:#00CC00;">
                              <td class="t15data" style="background-color:#00CC00;">PI_TRANSFERDAY</td>
                              <td class="t15data" style="background-color:#00CC00;">
                              <td class="t15data" style="background-color:#00CC00;">
                              <td class="t15data" style="background-color:#00CC00;">
                              <td class="t15data" style="background-color:#00CC00;">SUPPORT</td>
                              <td class="t15data" style="background-color:#00CC00;">
                              </tr>
                              <tr style="background-color:#00CC00;">
                              <tr style="background-color:#00CC00;">
                              <tr>
                              </tbody>
                              </table>
                              </div>
                              <table width="100%" cellspacing="0" cellpadding="0" border="0" summary="">
                              </td>
                              </tr>
                              </tbody>
                              </table>
                              </td>
                              <td valign="top" align="right">
                              <td class="t15RightBar" valign="top" align="right"></td>
                              </tr>
                              </tbody>
                              • 12. Re: Tabular Form Not Working After Upgrade to 4.2
                                evrm
                                Hi Gus,

                                in your HTML the item f04 is missing.
                                This might give you the error you get.
                                Is it possible for you to make an example app on apex.oracle.com to reproduce the error you get?

                                regards,
                                Erik-jan
                                • 13. Re: Tabular Form Not Working After Upgrade to 4.2
                                  Gus C
                                  I have created the report in my workspace

                                  Workspace: GUSCRIGHTON
                                  Username: ANGUS.CRIGHTON@HAVILOG.COM
                                  Password: terminator


                                  Application 12585 - ETL_TEST
                                  Username: ANGUS.CRIGHTON@HAVILOG.COM
                                  Password: terminator

                                  Can you please have a look

                                  Gus
                                  • 14. Re: Tabular Form Not Working After Upgrade to 4.2
                                    Arie Geller
                                    Hello Gus,

                                    >> I have created the report in my workspace …

                                    And, are you keep getting the same error message? I wouldn’t be surprised if you don’t.

                                    Looking at your HTML code, it seems that the problematic item is a classic Date Picker (there wasn’t any other in 3.2). It seems that the upgrade process created the surrounding object of the classic datepicker (fieldset) but, for some reason, didn’t create the item itself (which should be populated into f04).

                                    Try changing the column Display As type to Date Picker. It should force to APEX engine to change the way your page is rendering, and produced a valid Date Picker item. If it works, and you want to maintain application uniformity, you can change it back to Date Picker (Classic). This time the matching code should be generated correctly.

                                    Regards,
                                    Arie.

                                    -------------------------------------------------------
                                    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

                                    &diams; Author of Oracle Application Express 3.2 – The Essentials and More
                                    1 2 Previous Next