Home » Developer & Programmer » Forms » post change trigger problem??
post change trigger problem?? [message #135920] Sun, 04 September 2005 18:42 Go to next message
ramisy2k
Messages: 150
Registered: April 2005
Senior Member
Hi,
in a single record db block post_change trigger is fired after navigation takes place to another item and if changes are made, i have set this trigger on block level so that if any change is made in any of the block items it should enable a button

SET_ITEM_PROPERTY('block.item',ENABLED,PROPERTY_TRUE);

that is working ok..

the problem is that, suppose item_1 has value of 1
I change it to 5 and then again to 1 wihtout saving. Button gets enabled when i move to next item
i want the the button to remain disabled if the value is same as before..
is it possible???if yes how??
thanks in advnace..
ramis

[Updated on: Sun, 04 September 2005 18:56]

Report message to a moderator

Re: post change trigger problem?? [message #135933 is a reply to message #135920] Sun, 04 September 2005 23:49 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member

You can save your prev value and try comparing with the new value.If it still remains same then you can disable the button.

something like following.

prevvalue = :item;(should be in a different trigger which fires before entering into the item).

here is the post_change trigger code.

If prevvalue = :item then
SET_ITEM_PROPERTY('block.item',ENABLED,PROPERTY_FALSE);
else
SET_ITEM_PROPERTY('block.item',ENABLED,PROPERTY_TRUE);
end if;

--Kiran.
Re: post change trigger problem?? [message #136058 is a reply to message #135920] Mon, 05 September 2005 20:00 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You can do a similar thing by 'reading' the 'database_value' and seeing if it is different to the field value.

David
Previous Topic: Data to File
Next Topic: Need forms 6i/9i document
Goto Forum:
  


Current Time: Thu Sep 19 23:17:58 CDT 2024