Home » Developer & Programmer » Forms » Which Trigger?
Which Trigger? [message #639892] Mon, 20 July 2015 04:28 Go to next message
sanodani
Messages: 98
Registered: October 2014
Member
Hallo All...

I am trying to solve my Problem, but somehow i am bit in confusion.
My Problem is:

i have different master-Detail block. and it Display records selected in the master block, but i am trying to make some filed as not updatable or not insert or not delete, in case when one of my parameteter is not true is otherwise it can be inserted/update/delete.

and i use when-validate-item Trigger and my code:

if :Block1.text = 'EMAIL' then
 set_item_property('email', insert_allowed, property_true);
 set_item_property('email', update_allowed, property_true);
 set_item_property('email', delete_allowed, property_true);
else
 set_item_property('email', insert_allowed, property_false);
 set_item_property('email', update_allowed, property_false);
 set_item_property('email', delete_allowed, property_false);
emd if;


But, it does not work.... Sad
can anyone please help me on this regards?
Thankx in advance.

REgards,
Re: Which Trigger? [message #639893 is a reply to message #639892] Mon, 20 July 2015 04:32 Go to previous messageGo to next message
cookiemonster
Messages: 13291
Registered: September 2008
Location: Rainy Manchester
Senior Member
when-validate-item on which item?
You should always specify the block name as well as the item name when referring to items in code.
Re: Which Trigger? [message #639895 is a reply to message #639893] Mon, 20 July 2015 04:34 Go to previous messageGo to next message
sanodani
Messages: 98
Registered: October 2014
Member
hi . thankx for your prompt reply Smile

ya, i did Change that now with block_name, after googling Smile .. well i did this Trigger on the respective item, like in my case: email.
but i am not getting, what i am expecting to have. :/
Re: Which Trigger? [message #639897 is a reply to message #639895] Mon, 20 July 2015 04:43 Go to previous message
cookiemonster
Messages: 13291
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why would you put the trigger on email?
It should be on the item used to determine if email can be changed - so block1.text.
Previous Topic: File Store and Copy in Directory
Next Topic: how to make a calendar!
Goto Forum:
  


Current Time: Fri Oct 19 17:35:03 CDT 2018