insert records which are checked [message #514883] |
Thu, 07 July 2011 03:23 |
|
goparaju
Messages: 54 Registered: June 2011
|
Member |
|
|
Hi Experts,
I am working on form builder 6i. I have multi record datablock 't1'.'
I have 'Submit' Button, which contains 'commit_form'.
I am able to insert records.
Now i have a check box in data block, i want to insert records which are checked. I followed below thing to achieve that.
ON-INSERT Trigger:
If check_box ='Y' THEN
INSERT_RECORD
end if.
SUBMIT BUTTON: commit_form.
Let us say, i have 5 records, 2 records are checked, after clicking SUBMIT button, it's inserting 2 records only. But in console window, it's showing '5 transactions are saved'. I want see '2 transactions are saved' message in console window.
Could somebody help me how to get it or any other solution which will insert records which are checked and show correct message in console window.
Thanks in advance.
|
|
|
|
|
|
Re: insert records which are checked [message #514901 is a reply to message #514898] |
Thu, 07 July 2011 04:03 |
cookiemonster
Messages: 13938 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Have a read of the one I just posted for alternatives.
However I don't think you can get forms to show the correct message.
If you make it a non-database block and do everything through a button then you won't get that message at all.
If you base a block on a procedure it'll probably give you the count of all the records as you are getting now.
|
|
|
|
|
|
|
|
|
Re: insert records which are checked [message #514997 is a reply to message #514947] |
Thu, 07 July 2011 10:52 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It's not that it doesn't work - it works, but only in a special, ideal situation.
Something like Asterix, Obelix and the Romans. I don't remember how it really was, but - there was that Roman bartender who wanted to clear mess in his bar, so he took a bludgeon and hit a Roman soldier in his head - poor guy fell down. The bartender repeated the same action on another Roman soldier, with the same result. Then he hit Obelix into his head, and nothing happened. He hit him again - nothing. So he said: "It works, but not always".
Therefore, listen to what Druid says (i.e. Cookiemonster) and do what he says.
|
|
|