1 2 Previous Next 16 Replies Latest reply: Feb 19, 2013 7:29 AM by Joni Vandenberghe RSS

    Select List dynamic action error

    930803
      Hi Everyone,

      I am developing a mobile application using apex 4.2. In a page i created dynamic action to set value for employee no based on employee name in the select list (it appers like popup list ).
      Event : Change
      Item P10_EMP_NAME_OB
      True Action : SQL statement
      
      select employee_number
      from apps.xxhy_ams_details_v
      where upper(employee_name) = UPPER(:P10_EMP_NAME_OB)
      
      Page Item to submit : 10_EMP_NAME_OB
      Selection tye : Item
      Affected Item P10_EMP_NUMBER_OB
      If i choose any employee name in select list it showing the following error
      Error: parsererror - SyntaxError: JSON.parse: unexpected character
      Brgds,
      Max
        • 1. Re: Select List dynamic action error
          714270
          Max wrote:
          Hi Everyone,

          I am developing a mobile application using apex 4.2. In a page i created dynamic action to set value for employee no based on employee name in the select list (it appers like popup list ).
          Event : Change
          Item P10_EMP_NAME_OB
          True Action : SQL statement
          
          select employee_number
          from apps.xxhy_ams_details_v
          where upper(employee_name) = UPPER(:P10_EMP_NAME_OB)
          
          Page Item to submit : 10_EMP_NAME_OB
          Selection tye : Item
          Affected Item P10_EMP_NUMBER_OB
          If i choose any employee name in select list it showing the following error
          Error: parsererror - SyntaxError: JSON.parse: unexpected character
          Brgds,
          Max
          Shouldn't you be having both display and return value in your select query? Like:
          select employee_number d, employee_number r
          from apps.xxhy_ams_details_v
           where upper(employee_name) = UPPER(:P10_EMP_NAME_OB)
          Thanks,
          Rohit
          • 2. Re: Select List dynamic action error
            930803
            Hi Rohit,

            Thanks for your reply.

            This query is used in dynamic action fetch my the employee number based on the employee name from the select list
            select employee_number
            from apps.xxhy_ams_details_v
            where upper(employee_name) = UPPER(:P10_EMP_NAME_OB)
            This is my select list query
            SELECT EMPLOYEE_NAME D, EMPLOYEE_NAME R
            FROM APPS.XXHY_AMS_DETAILS_V
            ORDER BY 1
            • 3. Re: Select List dynamic action error
              Joni Vandenberghe
              Page item to submit is spelled wrong I think.
              Page Item to submit : 10_EMP_NAME_OB
              should be
              Page Item to submit : P10_EMP_NAME_OB
              Edited by: Joni Vandenberghe on 12-feb-2013 1:53
              • 4. Re: Select List dynamic action error
                930803
                Joni Vandenberghe wrote:
                Page item to submit is spelled wrong I think.
                Page Item to submit : 10_EMP_NAME_OB
                should be
                Page Item to submit : P10_EMP_NAME_OB
                Sorry i spelled wrongly its P10_EMP_NAME_OB only.

                Brgds,
                Max.
                • 5. Re: Select List dynamic action error
                  714270
                  Can you reproduce this issue in apex.oracle.com?
                  • 6. Re: Select List dynamic action error
                    930803
                    Hi Rohit,

                    Sorry for my late reply.

                    [http://apex.oracle.com/pls/apex/f?p=24749:1:8472930773216::NO:::]

                    In page 2 i created dynamic action to set value for location based on department select list.

                    Workspace Name : iyappan_ws
                    User Name : iyappan.m@4iapps.com
                    Password : Dragon123
                    Application No : 24749

                    Brgds,
                    Max.
                    • 7. Re: Select List dynamic action error
                      714270
                      Max wrote:
                      Hi Rohit,

                      Sorry for my late reply.

                      [http://apex.oracle.com/pls/apex/f?p=24749:1:8472930773216::NO:::]

                      In page 2 i created dynamic action to set value for location based on department select list.

                      Workspace Name : iyappan_ws
                      User Name : iyappan.m@4iapps.com
                      Password : Dragon123
                      Application No : 24749

                      Brgds,
                      Max.
                      Hi Max,

                      I ran your page and did not get any error when selecting department (DEPTNO). It sets the location field (Loc) without any issues.
                      What do you want me to look at in your app/page? Please clarify where/what is the issue.


                      Thanks,
                      Rohit
                      • 8. Re: Select List dynamic action error
                        930803
                        Rohit Kapoor wrote:
                        Hi Max,

                        I ran your page and did not get any error when selecting department (DEPTNO). It sets the location field (Loc) without any issues.
                        What do you want me to look at in your app/page? Please clarify where/what is the issue.


                        Thanks,
                        Rohit
                        Hi Rohit,

                        That error is still exist.The set value dynamic action is not working.

                        I attached screen shot of that error.

                        http://min.us/lbmAOc0wPRj3hZ
                        http://min.us/ldcxlik2RmWlL
                        http://min.us/lNVR7PlbwGyOc

                        Brgds,
                        Max.
                        • 9. Re: Select List dynamic action error
                          714270
                          Max wrote:
                          Rohit Kapoor wrote:
                          Hi Max,

                          I ran your page and did not get any error when selecting department (DEPTNO). It sets the location field (Loc) without any issues.
                          What do you want me to look at in your app/page? Please clarify where/what is the issue.


                          Thanks,
                          Rohit
                          Hi Rohit,

                          That error is still exist.The set value dynamic action is not working.

                          I attached screen shot of that error.

                          http://min.us/lbmAOc0wPRj3hZ
                          http://min.us/ldcxlik2RmWlL
                          http://min.us/lNVR7PlbwGyOc

                          Brgds,
                          Max.
                          I still couldn't duplicate the issue. What version of Chrome are you using? If not using the latest, please update it to the latest version and test.
                          Did you test this with other browsers like firefox, safari?
                          • 10. Re: Select List dynamic action error
                            Joni Vandenberghe
                            I tested your application with IE8,9. It indeed did not work. Your declaration of your dynamic action is correct so it is quite a brain teaser.

                            I recreated a copy of your application and recoded it with pure jQuery. I first tried an ajax page process but got the same error I got on your application (no data found). So then I used an application process and now it does work with IE.

                            It's strange that something this simple does not work with declarative APEX. Can you test out my solution?
                            http://apex.oracle.com/pls/apex/f?p=70742:1:724779905329#/pls/apex/f?p=70742
                            • 11. Re: Select List dynamic action error
                              930803
                              Joni Vandenberghe wrote:
                              I tested your application with IE8,9. It indeed did not work. Your declaration of your dynamic action is correct so it is quite a brain teaser.

                              I recreated a copy of your application and recoded it with pure jQuery. I first tried an ajax page process but got the same error I got on your application (no data found). So then I used an application process and now it does work with IE.

                              It's strange that something this simple does not work with declarative APEX. Can you test out my solution?
                              http://apex.oracle.com/pls/apex/f?p=70742:1:724779905329#/pls/apex/f?p=70742
                              Hi,

                              this is what am look for, your solution is working fine, can u explain me what u did.

                              Brgds,
                              Max.
                              • 12. Re: Select List dynamic action error
                                Joni Vandenberghe
                                In the javascript part of the page (right click on the page name > edit > javascript) I added an onchange event, that does an ajax call to get the value of the Location.
                                apex.jQuery('#P2_DEPTNO').live('change',function(){
                                    
                                    
                                    apex.jQuery.ajax({type: "POST"
                                       , url: "wwv_flow.show"
                                       , data: {  p_flow_id:$('#pFlowId').val()
                                                , p_flow_step_id:$('#pFlowStepId').val()
                                                , p_instance: $('#pInstance').val()
                                                , x01: $('#P2_DEPTNO').val()
                                                , p_request: 'APPLICATION_PROCESS=AJAX_GETLOC'
                                                }
                                       , success: function(data){
                                             $('#P2_LOC').val(data);
                                         } 
                                });
                                
                                });
                                And then I created an application process of the type "on demand" based on your query in the shared components
                                DECLARE
                                v_loc VARCHAR2(255);
                                BEGIN
                                INSERT INTO LOG VALUES (TO_NUMBER(wwv_flow.g_x01));
                                COMMIT;
                                 select LOC
                                into v_loc 
                                from DEPT
                                where DEPTNO = TO_NUMBER(wwv_flow.g_x01);
                                INSERT INTO LOG VALUES (v_loc );
                                COMMIT;
                                
                                HTP.P(v_loc);
                                
                                END;
                                I still think there might be a bug in Apex here that he cannot find the page process in IE, I would love to hear what the dev team thinks about this.

                                Edited by: Joni Vandenberghe on 19-feb-2013 4:22
                                • 13. Re: Select List dynamic action error
                                  Tom Petrus
                                  I was taking a look, but in the original app i can't see any page or application process. Were there? How was this set up? Is it the dynamic action (SetValue Location)?
                                  I have IE8 to test with, but both the applications work fine as they are right now, so I'm unsure as to what should or should not be broken. "Click here, do that, select this, bam error" reproduction steps would go such a long way when having to deal with an issue.
                                  • 14. Re: Select List dynamic action error
                                    Joni Vandenberghe
                                    Did you test with IE9? I made the change in application 70742, it's best to take a copy when your helping someone imo.
                                    1 2 Previous Next