This discussion is archived
2 Replies Latest reply: Aug 22, 2013 7:25 AM by kp2000 RSS

NEXT button with insert process

kp2000 Newbie
Currently Being Moderated

Hello,

 

I have a APEX 4.1 page where i display fields to create a new record against a table. I have validations like 'field can not be NULL'  on the page (pg#1).

I have 'PREVIOUS' and 'NEXT' buttons on the pg#1. At present when i click NEXT on pg#1, a custom insert process get called and a row get inserted.

 

The issue is that, for example when user clicks NEXT (on pg#1) he get directed to (pg #2) and there is a PREVIOUS button in that page(pg #2).

If the user clicks PREVIOUS button on pg#2 to see the pg#1, then he click PREVIOUS and go to pg#1.

 

Now if the user clicks 'NEXT' button on pg#1, Validations get fired from pg#1.

 

So user is not able to move out of pg#1 with out filling the not null fields on pg#1. How to avoid this scenario.

 

appreciate your help

 

thanks

kp

  • 1. Re: NEXT button with insert process
    Howard (... in Training) Pro
    Currently Being Moderated

    Questions: These pg#1 and pg#2 -- are those actual APEX pages?

     

    When I use PREV and NEXT, it has been exclusively for changing the rows displayed on a particular page.   That is, I stay on the page but the pagination changes.  Say, first it has records 1-10.  I press NEXT and get records 11-20 but it's still the same page.

     

    I'd choose different buttons to change pages.  But maybe it amounts to the same thing either way you do it.  If you need certain functionality the first time you change pages but not the second time, you will have to track when is the first NEXT press versus the next NEXT press and only allow the validations to fire the first time.  Maybe you need a First Time Flag as part of the validations conditions.  And the validations only fire the first time -- until they are reset.

     

    Howard

  • 2. Re: NEXT button with insert process
    kp2000 Newbie
    Currently Being Moderated

    Hi

    thanks for the reply

    Yes they are actual page numbers.

    I think i might need to use conditions for the custom insert process

     

    thanks

    kp

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points