Home » Developer & Programmer » Forms » how to disable updates after for specific status (Forms 6i)
how to disable updates after for specific status [message #386950] Tue, 17 February 2009 06:26 Go to next message
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?
Re: how to disable updates after for specific status [message #386956 is a reply to message #386950] Tue, 17 February 2009 06:45 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you should try the PRE-RECORD trigger.
Re: how to disable updates after for specific status [message #386960 is a reply to message #386950] Tue, 17 February 2009 06:53 Go to previous messageGo to next message
brijal_j_patel
Messages: 28
Registered: May 2007
Location: Surat,India
Junior Member
Dear sindikalac,
I want to know, status is based on table field. or its non datablock item?
And you are setting block property that effect to all record of block not the currenty record only.
Regards
Brijal
Re: how to disable updates after for specific status [message #386966 is a reply to message #386960] Tue, 17 February 2009 07:24 Go to previous messageGo to next message
sindikalac
Messages: 52
Registered: November 2008
Location: Europe
Member
Hello, brijal_j_patel

Item is databased, and yes I want to effect all records with that kind of status.
Re: how to disable updates after for specific status [message #386972 is a reply to message #386950] Tue, 17 February 2009 07:35 Go to previous message
sindikalac
Messages: 52
Registered: November 2008
Location: Europe
Member
Littlefoot my man Smile

You are right again!!

It works now.

Previous Topic: Exit From Windwo in a form?
Next Topic: how to change Prompt Backgroud Color
Goto Forum:
  


Current Time: Sat Dec 10 01:22:15 CST 2016

Total time taken to generate the page: 0.28376 seconds