how to disable updates after for specific status [message #386950] |
Tue, 17 February 2009 06:26  |
sindikalac
Messages: 52 Registered: November 2008 Location: Europe
|
Member |
|
|
Hi
I have one data block, and some items based on the block displayed on form.
I have one item called status. When I change a status of the item from 1 to 0, and commit it, I would like to disable any further updates on that record i.e. all records with the status=0, and to enable updates on all records with status=1.
This was my attempt:
I created when-window-activated trigger and put this code:
if :db.status=0 then SET_BLOCK_PROPERTY ('db', UPDATE_ALLOWED, PROPERTY_FALSE);
else
SET_BLOCK_PROPERTY ('db', UPDATE_ALLOWED, PROPERTY_TRUE);
end if;
But this didn't work fine. I tried to put similar code in PRE-UPDATE trigger, it didn't work fine.
Do you have any suggestion how to solve this?
|
|
|
|
|
|
|