8 Replies Latest reply: Nov 25, 2013 4:12 AM by 811598 RSS

    Submit Action and Redirect page in Tabular form Column Link

    811598

      Hi All,

       

      I have a scenario to submit the current page and redirect to another page with the arguments, when i clink on the link which is created using column link in Report Attributes.

       

      I can able to perform the submit action, but redirection is not happening.

       

      Created a column link on non database column by providing

       

      Link Attribute :     <a href="#" onclick="doSubmit('SAVE')">#FAM_DET#</a>

       

      Target : Page in this application

      Page : 7

      Item name : P7_TRAVEL_REQ_ID

      item Value: #TRAVEL_REQ_ID#

      Item name : P7_TRAVEL_REQ_LINE_ID

      item Value: #TRAVEL_REQ_LINE_ID#

       

      Can anyone help me out to resolve this.

        • 1. Re: Submit Action and Redirect page in Tabular form Column Link
          LA-APEX-DEv

          Remove the link attribute.

          • 2. Re: Submit Action and Redirect page in Tabular form Column Link
            811598

            I apologies for the typo mistake.

             

            I have placed in link text only not  in link attributes.

            • 3. Re: Submit Action and Redirect page in Tabular form Column Link
              LA-APEX-DEv

              Remove everything in the link text and add the #FAM_DET#

              • 4. Re: Submit Action and Redirect page in Tabular form Column Link
                811598

                I have removed and placed what u suggested. But then it will just redirect to the page specified. I want to save the current page data  when i click on the link.

                 

                Regards

                Chinthamani K

                • 5. Re: Submit Action and Redirect page in Tabular form Column Link
                  LA-APEX-DEv

                  If you want to save the current page data, you need to add a process prior to branching to another page. The simple thing to do is to create a hidden button and call a javascript with the following steps:

                   

                  1. Change the column link Target to URL (instead of Page in this application)

                  2. Enter javascript:saveRec('#TRAVEL_REQ_ID#','#TRAVEL_REQ_LINE_ID#'); in the URL textbox

                  3. Create two items on the page to store the passing values

                  3. Create a javascript function

                      <script>

                      function saveRec(pVal1,pVal2)

                      {

                         $x('P6_TRAVEL_REQ_ID').value = pVal1;

                         $x('P6_TRAVEL_REQ_LINE_ID').value = pVal2;

                         doSubmit('SAVE'); -->whatever your button name is

                      }

                     </script>

                  4. Create a process a process to save your data with the When Button Press (your button name)

                  5. Create a branch and enter 7 in the Page box, Set these items P7_TRAVEL_REQ_ID,P7_TRAVEL_REQ_LINE_ID, and &P6_TRAVEL_REQ_ID.,&P6_TRAVEL_REQ_LINE_ID. in the With these values box

                  • 6. Re: Submit Action and Redirect page in Tabular form Column Link
                    811598

                    Hi ,

                     

                    I don't understand some of the steps mentioned

                     

                    1     Changed the column link target and added javascript:saveRec('#TRAVEL_REQ_ID#','#TRAVEL_REQ_LINE_ID#'); in url textbox

                    2     Created two page item on tabular form region to store the line level value

                    3     how to create javascript function?

                    4     Asked me to create the process, also one hidden button to be created.-  Not able to understand

                    5     Branching is ok

                     

                    Please explain me in detail about javascript function and hidden button and a process linkage and how to define the same..

                     

                    Regards

                    Chinthamani

                    • 7. Re: Submit Action and Redirect page in Tabular form Column Link
                      fac586

                      811598 wrote:

                      Please update your forum profile with a real handle instead of "811598".


                      When posting a question here, always include the following information:


                      • Full APEX version
                      • Full DB/version/edition/host OS
                      • Web server architecture (EPG, OHS or APEX listener/host OS)
                      • Browser(s) and version(s) used

                      I have a scenario to submit the current page and redirect to another page with the arguments, when i clink on the link which is created using column link in Report Attributes.

                       

                      I can able to perform the submit action, but redirection is not happening.

                       

                      Created a column link on non database column by providing

                       

                      Link Attribute :     <a href="#" onclick="doSubmit('SAVE')">#FAM_DET#</a>

                       

                      Target : Page in this application

                      Page : 7

                      Item name : P7_TRAVEL_REQ_ID

                      item Value: #TRAVEL_REQ_ID#

                      Item name : P7_TRAVEL_REQ_LINE_ID

                      item Value: #TRAVEL_REQ_LINE_ID#

                      Remove the link attribute (what you have used there is not the correct way to use this property anyway).

                       

                      Change the target page to the same page as the report.

                       

                      Set the Column Link Request property to BRANCH_TO_PAGE_ACCEPT|SAVE.

                       

                      Create an On Submit: After Processing (After Computation, Validation, and Processing) branch to page 7, conditional on the SAVE request.

                       

                      If the SAVE request can be triggered by something other than the report link (e.g. a Save button) then use another request value that will trigger the required page process in the link request and branch condition, e.g. BRANCH_TO_PAGE_ACCEPT|APPLY and APPLY respectively.

                       

                      Note that there is a bug in BRANCH_TO_PAGE_ACCEPT processing in APEX 4.2.3 and a patchset exception must be installed for this approach to work on this APEX release.

                      • 8. Re: Submit Action and Redirect page in Tabular form Column Link
                        811598

                        HI,

                         

                        Iam done with that.. my problem got solved..

                         

                        I have defined the javascript function in html header section of page attributes..

                         

                        Thanks for the solution.

                         

                        Regards

                        Chinthamani