system.record_status [message #426830] |
Tue, 20 October 2009 00:52 |
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
|
|
|
|
|