Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

On load process returns null value but on refresh loads the values ??!!

Newbie_apex07Sep 10 2013 — edited Sep 10 2013

HI all

Using apex 4.1.1 Linux oc4j 11g

I am building a functionality which would allow to register by email.

Page 1

          The user enters an email address  ,First name&  last name,Insert statement is executed

select count (*) into c_email  -- if 0 then the person doesn't exist and registration is permitted

  from sor_notification_person

  where sor_notification_person.EMAIL_ADDRESS =P_S_EMAIL_ADDRESS;

  if c_email=0 then

-- Package.procedure send email and does the insert

  SOR_NOTIFICATIONS_PKG.signup_person (  P_S_EMAIL_ADDRESS => P_S_EMAIL_ADDRESS,

                                          P_S_FIRST_NAME => P_S_FIRST_NAME,

                                          P_S_LAST_NAME => P_S_LAST_NAME,

                                          P_S_CONFIRMED_EMAIL => P_S_CONFIRMED_EMAIL,

                                          P_S_SESSION => P_S_SESSION,

                                          P_S_APP_ID => P_S_APP_ID,                                     

                                          P_B_SUCCESS =>P_B_SUCCESS) ;

Page 2

On clicking or copying pasting URL received in email.I have on load process which checks the checksum value in DB and populates the data.

declare

ct number;

P31_checksum varchar2(30);

Email varchar2 (90);

F_name varchar2 (40);

l_name varchar2 (40);

P31_TEST varchar2(40);

begin

:P31_TEST := null;

    SELECT count(*)  into ct

   FROM SOR_NOTIFICATION_PERSON

     where SOR_NOTIFICATION_PERSON.checksum=:C;

   

    

        dbms_output.put_line(ct);

    

  if ct > 0

     then

  

    SELECT SOR_NOTIFICATION_PERSON.email_address ,SOR_NOTIFICATION_PERSON.first_name, SOR_NOTIFICATION_PERSON.last_name  into  Email,F_name,l_name

   FROM SOR_NOTIFICATION_PERSON

     where SOR_NOTIFICATION_PERSON.checksum=:C;

  

     :P31_TEST := 'Y';

      :P31_EMAIL_ADDRESS:=Email;

      :P31_FIRST_NAME :=F_name;

      :P31_LAST_NAME:=l_name;

   else :P31_TEST := 'N';

-- dbms_output.put_line(P31_TEST);

end if ;

end ;

Problem When I display the hidden item I can see the checksum value  but the P31_test is always null on load.when I hit refresh page P31_test validates & displays the value .

Both the items are set to only when value in session state is null.

What could be the reason for it not load even the process is defined as Load before region /once per page visit..

Thanks for your help.

This post has been answered by Tom Petrus on Sep 10 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2013
Added on Sep 10 2013
9 comments
1,241 views