Home » Developer & Programmer » Forms » How to read values in a multi record control block using Pre-insert trigger (block level) (Forms 5)
How to read values in a multi record control block using Pre-insert trigger (block level) [message #467456] Sat, 24 July 2010 09:08 Go to next message
raoracle
Messages: 2
Registered: July 2010
Junior Member
Hi,

I have a multi record control block (basically a text item displaying 6 records) where user enters values and I want to process the values using pre-insert trigger.

I want to read value in each record and then do some tasks using a pre-insert trigger before I commit the values. To navigate between the records I was using first_record, next_record, clear_record built-ins but it gives errors like "40737-illegalrestricted procedure next_record in pre-insert trigger".

Please let me know which is the best way to handle this...

Many thanks in advance.

Ven
Re: How to read values in a multi record control block using Pre-insert trigger (block level) [message #467478 is a reply to message #467456] Sat, 24 July 2010 13:07 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What "tasks" would that be?

As it seems that you'd like to modify all records, why wouldn't you - instead of PRE-INSERT - use WHEN-VALIDATE-RECORD?
Re: How to read values in a multi record control block using Pre-insert trigger (block level) [message #467666 is a reply to message #467478] Mon, 26 July 2010 09:00 Go to previous messageGo to next message
raoracle
Messages: 2
Registered: July 2010
Junior Member

Many thanks for your prompt respnse.

When the user is commiting a single record for another table (dummy table)I would like to insert records into this detail table. So I could not use when-validate-record trigger.

Infact these values in the multi record block are entered by the user and I would be either update the value if it already exists or insert if it does not.

Please advise.

Thanks,
ven

Re: How to read values in a multi record control block using Pre-insert trigger (block level) [message #467671 is a reply to message #467666] Mon, 26 July 2010 10:02 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you really can't use a database datablock your best bet would be to add a button and do all the necessary processing in the WHEN-BUTTON-PRESSED trigger.

To be honest I don't understand how you can be using a pre-insert trigger on a control block. Control means it's not based on a database table and so any pre-insert trigger would never fire.
Previous Topic: data not saved
Next Topic: Update in master-detail set up
Goto Forum:
  


Current Time: Fri Sep 20 03:36:30 CDT 2024