Home » Developer & Programmer » Forms » Partial Status change for record (Form 6i)
Partial Status change for record [message #411733] Mon, 06 July 2009 08:45 Go to next message
hiteshkanjaria
Messages: 8
Registered: September 2008
Junior Member
Hi,

I am facing some problem while develoing a data block in a form.

Details are below,
Table: STUDENT
Data: ROLLNO  NAME       TEST1  TEST2  TEST3  GRACE
        001   ABC         35      35     35     20
        002   DEF         40      39     52     25
        003   GHI         35      41     49     20
        004   JKL         36      35     50     30

Problem:
My data block contains all the records from the STUDENT table.
Now I want in Modify operation that user are not allowed to change the values of TEST1,TEST2 and TEST3 columns for with the all three values are 35, but allowed to change value of GRACE of the same.
User shuld be able to change all the four column for other values of TESTn columns.
When I tried to write item level code in POST-QUERY trigger, it is changing the status for all the record instead only for records which have TESTn column values equal to 35.

Waiting for reply.

[EDITED by LF: applied [pre] tags to preserve formatting]

[Updated on: Mon, 06 July 2009 11:02] by Moderator

Report message to a moderator

Re: Partial Status change for record [message #411735 is a reply to message #411733] Mon, 06 July 2009 08:47 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
use set_item_instance_property
Re: Partial Status change for record [message #411777 is a reply to message #411733] Mon, 06 July 2009 12:50 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

use When-New-Item-Instance trigger with set_item_instance_property as suggested by "cookiemonster"

In the trigger write this code
if :STUDENT.TEST1 = '35' then
   set_item_instance_property('STUDENT.TEST1', current_record, update_allowed, property_false);
end if;


Write this code on TEST2 and TEST3 as well.
Previous Topic: I have a problem with forms
Next Topic: Find Record with Default Where
Goto Forum:
  


Current Time: Fri Sep 20 13:50:13 CDT 2024