Home » Developer & Programmer » Forms » problem with trigger
problem with trigger [message #176725] Fri, 09 June 2006 05:36 Go to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Hello!
I have form with some fields. One of those fields names AKTUALNY_ZAKLAD. I want make such thing:
When I insert fields, this AKTUALNY_ZAKLAD should be insert-able, changeable etc. But if I enter query ( using F7 key) and accept that query ( using F8 key) AKTUALNY_ZAKLAD should be lock, and user should not have possible to change it.
For this filed I have triggers:
WHEN-NEW-ITEM-INSTANCE
begin
if :au1.aktualny_zaklad is null 
then do_key('list_values');
end if;
end;

POST-TEXT_ITEM
set_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM,BORDER_BEVEL,PLAIN);

--RAISED,LOWERED,PLAIN


and PRE-TEXT-ITEM
set_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM,BORDER_BEVEL,PLAIN);

--RAISED,LOWERED,PLAIN


for my needs, I have made trigger
KEY-F7
set_item_property(:au1.aktualny_zaklad,insert_allowed,property_false);


but it doesn't work Sad please help
Re: problem with trigger [message #176745 is a reply to message #176725] Fri, 09 June 2006 07:06 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Set the query-allowed property false. No need to set properties dynamic.

MHE
Re: problem with trigger [message #176912 is a reply to message #176745] Mon, 12 June 2006 00:12 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
I have made trigger:
KEY-F7 on item level:
set_item_property(AU1:.AKTUALNY_ZAKLAD,query_allowed,property_false);



but it is still wrong:-(
Please help.
Re: problem with trigger [message #176913 is a reply to message #176912] Mon, 12 June 2006 00:13 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
sorry little mistake
set_item_property( :AU1.AKTULANY_ZAKLAD, query_allowed,property_false);
Re: problem with trigger [message #177647 is a reply to message #176913] Fri, 16 June 2006 00:19 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: problem with trigger [message #177665 is a reply to message #177647] Fri, 16 June 2006 01:09 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
I said:
Quote:

Set the query-allowed property false. No need to set properties dynamic.
this means:
- in the object navigator, select the item you don't want to be query-able.
- right click
- select property palette
- select query allowed property in the property palette
- select FALSE
- close the property palette
- compile the form
- build the form
- run the form

I bet you didn't try that. I have, it worked.

MHE
Re: problem with trigger [message #178107 is a reply to message #177665] Mon, 19 June 2006 07:07 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
I have solved it but not using the trigger. I set modification allowed property 'no' and it works. But I still don't know how to do that usin trigger Sad
Re: problem with trigger [message #178108 is a reply to message #177665] Mon, 19 June 2006 07:09 Go to previous message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Thank you for your attention, I will try your way too Smile
Previous Topic: About List item
Next Topic: error when runnig a form in developer 10g !!
Goto Forum:
  


Current Time: Fri Sep 20 11:33:09 CDT 2024