1 2 Previous Next 26 Replies Latest reply: Mar 14, 2012 9:39 AM by Joe R Go to original post RSS
      • 15. Re: Multi-Select List with Submit
        fac586
        Joe R wrote:
        Fac,

        Is this statement the same for any version? I'm on 4.0.2.00.07. I set the condition in the Region to PL/SQL Expression and the Region does not display!
        The only requirement is regexp support, so it requires a 10g database, but I think APEX 4.0 does as well...

        What is shown in the debug trace?
        • 16. Re: Multi-Select List with Submit
          Joe R
          Fac,

          If I did this debug correctly, is this what you're looking for?
          Elapsed Execution   Message                                                                                     Level 
          0.00881 0.00756     S H O W: application="159" page="49" workspace="" request="" session="2760108509271536"     4
          0.01633 0.00310     Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us               4
          0.01937 0.00254     alter session set nls_language="AMERICAN"                                                   4
          0.02197 0.00217     alter session set nls_territory="AMERICA"                                                   4
          0.02418 0.00244     NLS: CSV charset=WE8MSWIN1252                                                               4
          0.02652 0.00125     ...NLS: Set Decimal separator="."                                                           4
          0.02775 0.00172     ...NLS: Set NLS Group separator=","                                                         4
          0.02946 0.00162     ...NLS: Set g_nls_date_format="DD-MON-RR"                                                   4
          0.03107 0.00149     ...NLS: Set g_nls_timestamp_format="DD-MON-RR HH.MI.SSXFF AM"                               4
          0.03257 0.00492     ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR"                        4
          0.03753 0.00208     ...Setting session time_zone to -06:00                                                      4
          0.03964 0.00345     NLS: Language=en-us                                                                         4
          0.04306 0.00560     Application 159, Authentication: CUSTOM2, Page Template: 3585214926514977                   4
          0.04866 0.00226     ...Session ID 2760108509271536 can be used                                                  4
          0.05089 0.00256     ...Application session: 2760108509271536, user=RNXP37                                       4
          0.05344 0.00187     ...Determine if user "RNXP37" workspace "6107132214640705" can develop application "159" in workspace "6107132214640705"    4
          0.05530 0.00262     ...Check for session expiration:                                                            4
          0.05794 0.00464     Session: Fetch session header information                                                   4
          0.06259 0.00308     ...fetch session state from database                                                        4
          0.06570 0.00278     fetch items                                                                                 4
          0.06843 0.00194     ...fetched 25 session state items                                                           4
          0.07036 0.00285     Branch point: Before Header                                                                 4
          0.07321 0.00709     Fetch application meta data                                                                 4
          0.08034 0.00252     ...metadata, fetch computations                                                             4
          0.08285 0.00248     ...metadata, fetch buttons                                                                  4
          0.08539 0.00151     Computation point: Before Header                                                            4
          0.08689 0.00111     Processing point: Before Header                                                             4
          0.08792 0.00212     ...metadata, fetch item type settings                                                       4
          0.09003 0.01508     ...metadata, fetch items                                                                    4
          0.10516 0.00720     Show page template header                                                                   4
          0.11236 0.00147     Computation point: After Header                                                             4
          0.11377 0.00103     Processing point: After Header                                                              4
          0.11478 0.00284     ...Process "Fetch Row from PROJECT": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:PROJECT:P49_PROJECT_ID:PROJECT_ID   4
          0.11766 0.00625     Authorization Check: "6389131775083476" User: "RNXP37" Component: "tab"                     4
          0.12393 0.00161     Post Authorization Check                                                                    4
          0.12551 0.00536     Authorization Check: "6388725411072113" User: "RNXP37" Component: "tab"                     4
          0.13088 0.00327     Post Authorization Check                                                                    4
          0.13415 0.00995     Region: Breadcrumb                                                                          4
          0.14414 0.00161     Computation point: Before Box Body                                                          4
          0.14581 0.00216     Processing point: Before Box Body                                                           4
          0.14784 0.00298     Region: Note                                                                                4
          0.15085 0.00751     Region: Create a New Project                                                                4
          0.15838 0.01316     Item: P49_PRODUCT_GROUP_ID NATIVE_CHECKBOX                                                  4
          0.17156 0.00316     Item: P49_REFRESH BUTTON                                                                    4
          0.17469 0.00311     Item: P49_PROJECT_CUSTOMER_DESC NATIVE_TEXT_FIELD                                           4
          0.17779 0.60369     Item: P49_LOCATION_ID NATIVE_SELECT_LIST                                                    4
          0.78152 0.01311     Item: P49_CUST_TYPE NATIVE_CHECKBOX                                                         4
          0.79460 0.00966     Item: P49_STATUS_ID NATIVE_SELECT_LIST                                                      4
          0.80432 0.00276     Item: P49_PROJECT_VALUE NATIVE_HIDDEN                                                       4
          0.80699 0.02611     Item: P49_PROJ_LEAD NATIVE_SELECT_LIST                                                      4
          0.83315 0.00252     Item: P49_PROJECT_SALESFORCE_NUM NATIVE_HIDDEN                                              4
          0.83562 0.00236     Item: P49_BID_WRAP_ID NATIVE_HIDDEN                                                         4
          0.83797 0.00331     Item: P49_PROJECT_CONTACT NATIVE_TEXTAREA                                                   4
          0.84129 0.00210     Item: P49_RETURN_PAGE_PROJECT NATIVE_HIDDEN                                                 4
          0.84338 0.00255     Item: P49_NEW_PROJECT_ID NATIVE_HIDDEN                                                      4
          0.84594 0.00237     Item: P49_PROJECT_FED NATIVE_HIDDEN                                                         4
          0.84831 0.00493     Item: P49_FEATURE_LAST_MODIFY_DATE NATIVE_HIDDEN                                            4
          0.85325 0.00522     Item: P49_FEATURE_LAST_MODIFY_BY NATIVE_HIDDEN                                              4
          0.85847 0.00306     Item: P49_CREATED_BY NATIVE_HIDDEN                                                          4
          0.86154 0.00473     Region: Astro - System Topology                                                             4
          0.86625 0.00467     Region: Tetra - System Topology                                                             4
          0.87093 0.00363     Region: Email Notifications                                                                 4
          0.87459 0.03059     Item: P49_EMAIL_NOTIFICATIONS NATIVE_SHUTTLE                                                4
          0.90519 0.00146     Computation point: After Box Body                                                           4
          0.90669 0.00136     Processing point: After Box Body                                                            4
          0.90794 0.00091     Computation point: Before Footer                                                            4
          0.90883 0.00106     Processing point: Before Footer                                                             4
          0.91024 0.00373     Show page tempate footer                                                                    4
          0.91371 0.00313     Region: Software Version                                                                    4
          0.91683 0.00855     Item: P0_HOST NATIVE_HIDDEN                                                                 4
          0.92538 0.00160     Computation point: After Footer                                                             4
          0.92695 0.00115     Processing point: After Footer                                                              4
          0.92806 0.01056     Log Activity:                                                                               4
          0.93873 0.00178     v$sesstat.statistic# = 436: execute count=3319                                              4
          0.94043 -           End Show Page                                                                               4
          -
          1 - 75
          Thanks,
          Joe
          • 17. Re: Multi-Select List with Submit
            fac586
            I don't see anything unusual going on there. You haven't overlooked anything obvious like not changing the item names from those used in the example to those in the actual app?

            All I can suggest is uploading your real app to apex.oracle.com so we can see it. Doesn't have to run, just need to see the regions and conditions involved.
            • 18. Re: Multi-Select List with Submit
              Joe R
              Fac,

              I've been trying to upload the page, but I keep getting:

              This page was exported from a different application or from an application in different workspace. Page cannot be installed in this application.

              I'm still trying.

              Thanks,
              Joe

              UPDATE:
              Fac,
              I've updated the wwv_flow.g_flow_id in the page export to the application ID on apex.oracle.com and I've been increasing the wwv_flow_api.g_id_offset by 1 each time, but I'm still getting the above error. Is there something different I need to do to get this imported?

              Thanks,
              Joe

              Edited by: Joe R on Mar 13, 2012 9:10 AM
              • 19. Re: Multi-Select List with Submit
                fac586
                Joe R wrote:
                Fac,

                I've been trying to upload the page, but I keep getting:

                This page was exported from a different application or from an application in different workspace. Page cannot be installed in this application.

                I'm still trying.

                Thanks,
                Joe

                UPDATE:
                Fac,
                I've updated the wwv_flow.g_flow_id in the page export to the application ID on apex.oracle.com and I've been increasing the wwv_flow_api.g_id_offset by 1 each time, but I'm still getting the above error. Is there something different I need to do to get this imported?
                This is all unsupported and capable of breaking your app/instance.

                Keep it simple and import the entire application.
                • 20. Re: Multi-Select List with Submit
                  Joe R
                  Fac,

                  Well the application is there, but there's no images and the page looks like there's no theme attached. I have no idea what's going on with this application. It's app ID 64464 and page 49.

                  Thanks,
                  Joe
                  • 21. Re: Multi-Select List with Submit
                    fac586
                    As I suggested above, you've pasted in the conditions from the demo app:
                    regexp_like(':' || :P1_PRODUCT_GROUP_ID || ':', ':41:|:181:')
                    without changing the item name to that actually used in the real page:
                    regexp_like(':' || :P49_PRODUCT_GROUP_ID || ':', ':41:|:181:')
                    • 22. Re: Multi-Select List with Submit
                      Joe R
                      Fac,

                      I'm still getting the same results as before. The region does not display and when I select more than one checkbox and click the button I'm still getting ORA-20001: Invalid PL/SQL expression condition: ORA-06502: PL/SQL: numeric or value error: character to number conversion error.

                      I've even tried doing a PL/SQL Function Returning Boolean:
                      DECLARE
                          prodgrplist APEX_APPLICATION_GLOBAL.VC_ARR2;
                      BEGIN
                          prodgrplist := APEX_UTIL.STRING_TO_TABLE(:P49_PRODUCT_GROUP_ID);
                      
                          FOR i IN (SELECT product_group_id FROM product_group WHERE product_group_desc LIKE 'ASTRO%')
                          LOOP
                              FOR j IN 1..prodgrplist.count
                              LOOP
                                  IF (i.product_group_id = prodgrplist(j)) THEN
                                      RETURN TRUE;
                                  END IF;
                              END LOOP;
                          END LOOP;
                       RETURN FALSE;
                      END;
                      The select list is actually coming from a table, but that shouldn't make any difference. I made it a static list so I wouldn't have to create database objects.
                      Not sure what to do.

                      Thanks,
                      Joe
                      • 23. Re: Multi-Select List with Submit
                        fac586
                        Joe R wrote:

                        I'm still getting the same results as before. The region does not display and when I select more than one checkbox and click the button I'm still getting ORA-20001: Invalid PL/SQL expression condition: ORA-06502: PL/SQL: numeric or value error: character to number conversion error.
                        Similar error message, doesn't mean it's still occurring in the same place. Debug trace shows:
                        Processes - point: AFTER_SUBMIT
                        0.16232     0.00077     ...Process "Process Row of PROJECT" - Type: DML_PROCESS_ROW     
                        0.16309     0.00069     ......Skip because "When Button Pressed" doesn't match with REQUEST
                        0.16378     0.00110     ...Process "Email_Notifications" - Type: PLSQL
                        0.16488     0.00051     ......Skip because condition or authorization evaluates to FALSE
                        0.16538     0.00058     ...Process "Update_Project_Product_Group" - Type: PLSQL
                        0.16596     0.00055     ......Skip because "When Button Pressed" doesn't match with REQUEST
                        0.16652     0.00061     ...Process "Update Project FED when NULL" - Type: PLSQL
                        0.16714     0.00083     ......Skip because condition or authorization evaluates to FALSE
                        0.16795     0.00218     ...Process "Update Frequency Band" - Type: PLSQL
                        0.17013     0.00470     ...Execute Statement: begin wwv_flow.g_boolean := :P49_PRODUCT_GROUP_ID IN (41,181); end;
                        0.17483     0.00157     Add error onto error stack
                        0.17639     0.00117     ...Error data:
                        0.17756     0.00096     ......message: Error processing condition.
                        0.17852     0.00090     ......additional_info: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
                        0.17942     0.00087     ......display_location: ON_ERROR_PAGE
                        0.18028     0.00093     ......is_internal_error: true
                        0.18121     0.00084     ......apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
                        0.18205     0.00083     ......ora_sqlcode: -6502
                        0.18287     0.00097     ......ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
                        0.18384     0.00082     ......error_backtrace: ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 966 ORA-06512: at "SYS.WWV_DBMS_SQL", line 992 ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 445 ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 141
                        0.18466     0.00081     ......component.type: APEX_APPLICATION_PAGE_PROCESS
                        0.18547     0.00112     ......component.id: 60059358144856697093
                        0.18659     0.00172     ......component.name: Update Frequency Band
                        0.18832     0.00092     ...Show Error on Error Page     
                        0.18923     0.00426     ......Performing rollback
                        0.19351     0.01686     Rendering form open tag and internal values
                        0.21040     0.00247     Processes - point: AFTER_ERROR_HEADER
                        0.21282     0.00188     Processes - point: BEFORE_ERROR_FOOTER     
                        0.21470     0.00222     Rendering form close tag and page checksum
                        0.21695     -     End Page Processing     
                        Is the "Update Frequency Band" process supposed to have a similar condition to the Astro/Tetra regions?
                        Not sure what to do.
                        Suggest you read the chapter on Debugging.

                        You also need to change the <tt>P49_PRODUCT_GROUP_ID</tt> Source Used attribute to Only when current value in session state is null. At present the checkbox selection is being reset on every page view.
                        • 24. Re: Multi-Select List with Submit
                          Joe R
                          Fac,

                          I really do appreciate all the help!

                          The Update Frequency Band process will be updated and I'll make sure that the process is attached to the Create button. I just haven't gotten that far yet. I've been focusing on trying to get these regions to display correctly. These two regions are a new request that came out of UAT last week. I've also been trying to talk the DBA into upgrading APEX to the current version, but he wants to do a test deployment before doing the upgrade.

                          How did you get the UI to show correctly?

                          Thanks,
                          Joe
                          • 25. Re: Multi-Select List with Submit
                            fac586
                            Joe R wrote:

                            How did you get the UI to show correctly?
                            Changed the Image Prefix application attribute from <tt>/i4/</tt> to <tt>/i/</tt> to pick up theme/CSS/JS files on apex.oracle.com.
                            • 26. Re: Multi-Select List with Submit
                              Joe R
                              Fac,

                              Obviously I never thought about that!

                              Well I was able to get this working finally!

                              As I've said earlier I've been trying to get my DBA to upgrade to the current version where all the suggestions seem to be working and when I got in this morning I had an email from him with these instructions for setting up Javascript to achieve the regions showing and hiding.

                              Here's what he said:

                              The sample here is for 4 checkboxes to control the hide/show regions.

                              Check A and C, show the “1st region”. Uncheck all, hide the “1st region”.
                              Check B and D, show the “2nd region”. Uncheck all, hide the “2nd region”.

                              1. In the Attributes section on the first Region create the static ID for example "REGION1" (without the double quotes).

                              2. Do the same with the other Region for example "REGION2" (without the double quotes).

                              3. In the Element section of the Check Box item in the HTML Form Element Attributes, add the function name.
                              onClick="f_ToggleRegion();"
                              4. Add this function in the page header or JavaScript section in the 'Function and Global Variable Declaration' section:
                              function f_ToggleRegion() 
                              {
                                  chkbox_name = html_GetElement('P1_CHECKBOX_0').name;
                                  //To get the actual name of the item I ran the page and did a 'view source' to search for the check box item and got the name from the name attribute (name="??")
                              
                                  chkbox_array = document.getElementsByName(chkbox_name);
                              
                                  var v_region1_show = false;
                                  var v_region2_show = false;
                              
                                  for (i = 0; i < chkbox_array.length; i++) 
                                  {
                                      if ((chkbox_array.value == 'A' || chkbox_array[i].value == 'C') && chkbox_array[i].checked) 
                              {
                              v_region1_show = true;
                              }

                              if ((chkbox_array[i].value == 'B' || chkbox_array[i].value == 'D') && chkbox_array[i].checked)
                              {
                              v_region2_show = true;
                              }
                              }

                              if (v_region1_show)
                              {
                              document.getElementById('REGION1').style.display = "";
                              }
                              else
                              {
                              document.getElementById('REGION1').style.display = "none";
                              }

                              if (v_region2_show)
                              {
                              document.getElementById('REGION2').style.display = "";
                              }
                              else
                              {
                              document.getElementById('REGION2').style.display = "none";
                              }
                              }
                              I then added two more lines in the 'Execute When Page Loads' section to hide the regions on page load:
                              document.getElementById('REGION1').style.display = "none";
                              document.getElementById('REGION2').style.display = "none";
                              That's it.  Thank you again for ALL your help!  It really is greatly appreciated!
                              
                              Thanks,
                              Joe                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                              1 2 Previous Next