• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9935
  • Last Modified:

Oracle Forms 6i List of Values

Hello Experts,

Can you please advise me on this:

I have a form [6i]with 'Tabs'.
I have a LOV in tab 'region'.user invokes the LOV and selects a value from it and saves the record.It works fine. If the user does not select the value from LOV by clicking 'Cancel'
then I retrieve the existing value by using get_item_property.when i click on second tab 'sales' and come back to tab 'region' forms prompts 'Do you want to save changes you have made'.I have  not made any change.How can I suppress 'Do you want to save changes'??
if :region.reason = 1 then


      DECLARE
             dummy       BOOLEAN;
      BEGIN

          dummy := Show_LOV('constraints',460,130);
          IF NOT DUMMY then
          :region.onreason := get_item_property('region.onreason',database_value);
          
                      raise form_trigger_failure;
          end if;
             END;


 end if;

Thanks
if :region.reason = 1 then
 
 
	DECLARE
		 dummy	 BOOLEAN;
	BEGIN
 
    	dummy := Show_LOV('constraints',460,130);
    	IF NOT DUMMY then
    	:region.onreason := get_item_property('region.onreason',database_value);
    	
    			raise form_trigger_failure;
    	end if;
		 END; 
 
 
 end if;

Open in new window

0
spsun
Asked:
spsun
  • 2
2 Solutions
 
Ritesh_GargCommented:
Try this:
DECLARE
   dummy          BOOLEAN;
   l_rec_status   varchar2(10);
BEGIN
   l_rec_status := get_record_property(to_number(:system.cursor_record),:system.current_block, status);
   dummy := Show_LOV('constraints',460,130);
   IF NOT DUMMY then
     :region.onreason := get_item_property('region.onreason',database_value);
     raise form_trigger_failure;
   end if;
  set_record_property(:system.cursor_record),:system.current_block, status, l_rec_status);
END; 

Open in new window

0
 
Ritesh_GargCommented:
A correction:
DECLARE
   dummy          BOOLEAN;
   l_rec_status   varchar2(10);
BEGIN
   l_rec_status := get_record_property(to_number(:system.cursor_record),:system.current_block, status);
   dummy := Show_LOV('constraints',460,130);
   IF NOT DUMMY then
     :region.onreason := get_item_property('region.onreason',database_value);
     set_record_property(:system.cursor_record),:system.current_block, status, l_rec_status);
     raise form_trigger_failure;
   end if;
END; 

Open in new window

0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now