Home » Developer & Programmer » Forms » How to Check a listbox change in oracle forms
How to Check a listbox change in oracle forms [message #640401] Tue, 28 July 2015 01:45 Go to next message
PREETISINGLA
Messages: 3
Registered: June 2015
Junior Member
Hello Every One,i have created a form where there are four list boxes, now my requirement is how can i check whether the values in any of the listbox is changed or not . whether we have to make use of any trigger or pl/sql block..please guide me regarding it.
Re: How to Check a listbox change in oracle forms [message #640441 is a reply to message #640401] Tue, 28 July 2015 09:16 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
You can use the When-List-Changed trigger on each ListBox item or at the Block Level. If the trigger fires, it means a ListBox value has been changed.

Craig...
Re: How to Check a listbox change in oracle forms [message #640495 is a reply to message #640401] Wed, 29 July 2015 09:06 Go to previous message
rajesh4851
Messages: 89
Registered: January 2007
Member
what Craig said is correct.

Here is another way:
Create 4 global variables in WHEN-NEW-FORM-INSTANCE or POST-QUERY (If its single record block) and store the 4 list item values in that global variables.

Now compare that 4 global variables to current items in WHEN-VALIDATE-RECORD trigger .
below is sample code :

IF :GLOBAL.ITEM1 = :BLOCK1.ITEM1
OR
 :GLOBAL.ITEM2 = :BLOCK1.ITEM2
OR
 :GLOBAL.ITEM3 = :BLOCK1.ITEM3
OR
 :GLOBAL.ITEM4 = :BLOCK1.ITEM4
THEN
      MESSAGE('Value has been changed');
      MESSAGE('Value has been changed');
END IF;
Previous Topic: FRM-40735:WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06508.
Next Topic: disable text item based on value in previous text item
Goto Forum:
  


Current Time: Thu Mar 28 05:46:19 CDT 2024