Home » Developer & Programmer » Forms » system.record_status (Oracle 10g)
system.record_status [message #426830] Tue, 20 October 2009 00:52 Go to next message
laith
Messages: 41
Registered: December 2008
Location: U.A.E
Member
hi guys... i have 2 database block, the detail block has ID field
that showing the Name (display item), the problem is: everytime i
want to update ID, the name doesn't change...i think because of i wrote (:system.record_status != 'QUERY') in th beginning of the code but if i remove it i will get message(DO YOU WANT TO SAVE?) when i move between the 2 database blocks even when i don't change anything...this is the code in ID field.
thank you for your help.

when_validate_item(ID)
if :system.record_status != 'QUERY' then

:s_name := null;
  if :id is not null
  then
   begin
   select spriden_pidm, substr(ltrim(rtrim(spriden_first_name||' '||spriden_mi)||' ')||spriden_last_name,1,40) student_name
   into   :PYPSTSD_PARTICIPANT_PIDM,:s_name
   FROM   SPRIDEN
   where  spriden_id = :id
   and    spriden_change_ind is null;

     exception when no_data_found then
          message('*ERROR* Invalid ID; press LIST for Name/ID search.');
          RAISE FORM_TRIGGER_FAILURE; 
   end;
   
  begin
   SELECT count (*) into :global.dummy
   FROM   PYPSTSD
   WHERE  PYPSTSD_PARTICIPANT_PIDM   =:PYPSTSD_PARTICIPANT_PIDM
   and    PYPSTSD_DATE               =:PYPSTSD_DATE
   and    PYPSTSD_TRAINING_LOCN      =:PYPSTSD_TRAINING_LOCN
   and    PYPSTSD_TRAINING_CODE      =:PYPSTSD_TRAINING_CODE;
   	
   if :global.dummy = 1 then
              message('*ERROR* Duplicated Record.');
              RAISE FORM_TRIGGER_FAILURE; 
   end if;
  end;
 
end if;
end if;

[EDITED by LF: applied [code] tags]

[Updated on: Tue, 20 October 2009 01:35] by Moderator

Report message to a moderator

Re: system.record_status [message #426842 is a reply to message #426830] Tue, 20 October 2009 01:38 Go to previous messageGo to next message
Littlefoot
Messages: 20827
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Set the "name" item's value in the POST-QUERY trigger (in order to display it when scrolling through records fetched by query).
Re: system.record_status [message #426846 is a reply to message #426842] Tue, 20 October 2009 01:41 Go to previous message
laith
Messages: 41
Registered: December 2008
Location: U.A.E
Member
i did what you said,,, the problem is solved...thank you
Previous Topic: Deactivate Calling Form when open_Form is used
Next Topic: How does one make next_record built-in working automatic?
Goto Forum:
  


Current Time: Fri Sep 30 03:48:24 CDT 2016

Total time taken to generate the page: 0.10936 seconds