Home » Developer & Programmer » Forms » Set item value in ON-ERROR trigger
Set item value in ON-ERROR trigger [message #150373] Wed, 07 December 2005 10:45 Go to next message
SaraC
Messages: 81
Registered: August 2005
Member
I have a form that traps an error as it comes into the form using ON-ERROR.

When a particular error is trapped I want to set a text item in a data block. I have created the item and the data block and used the following syntax

:BLOCK.ITEM := 1;

This compiles ok - but when I try to run it and retrieve the value from the block with message(:BLOCK.ITEM), I get the message No records in block.

Ive tried GO_BLOCK first but cant do that in ON-ERROR trigger.

Any ideas why I cant seem to set the value? I need it to hold a value received in the on-error trigger so I can use it from the when_new_form_instance trigger is called.

Am grateful of any help - been working on something for a long time and I think this would bypass a problem I was having!!Heres hoping!

Sara
Re: Set item value in ON-ERROR trigger [message #150438 is a reply to message #150373] Wed, 07 December 2005 19:44 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I have no idea why you want to do this, but this is the one time that you DO need to use the 'magic' block 'global'. So use ':global.my_itm' and store the value in there.

David
Previous Topic: On_UPDATE
Next Topic: Form restriction
Goto Forum:
  


Current Time: Fri Sep 20 05:31:37 CDT 2024