post change trigger problem?? [message #135920] |
Sun, 04 September 2005 18:42 |
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 |
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.
|
|
|
|