How to save multiple entry having checked box and Check box problem (merged) [message #314560] |
Thu, 17 April 2008 03:03  |
|
Hello,
I have got a form, where i have several entries. Now i would like to save only those entries which is cheked. i don't have any problem while inserting only one entry checked, but can't insert multiple entries having checked box option. Any idea or a piece of code will be highly appreciatable. Please help me, if you can.Please see the attatched .fmb for more clarification.
Thank you
Mahatab,Dhaka.
|
|
|
Check box problem [message #315042 is a reply to message #314560] |
Fri, 18 April 2008 13:44   |
|
Hello
I have send a message (message #314560) to you all but yet no reply. I know its a free help source, still a hints is expected from you all. Atleast give me a hints to work with. Please my intension is not hurt any body.
Thank you
Mahatab,Dhaka.
|
|
|
Re: How to save multiple entry having checked box [message #315053 is a reply to message #314560] |
Fri, 18 April 2008 14:12   |
Kaeluan
Messages: 179 Registered: May 2005 Location: Montreal, Quebec
|
Senior Member |
|
|
Hello,
what exactly is not working?
I noticed that you tried to navigate to each record to see if the checkbox was check and insert your record. This should work.
I see that you tried to catch the system.last_record in your code. This value may be case sensitive, not sure but you can try with
exit when :system.last_record = 'TRUE';
|
|
|
|
Re: How to save multiple entry having checked box [message #315057 is a reply to message #314560] |
Fri, 18 April 2008 14:31  |
Kaeluan
Messages: 179 Registered: May 2005 Location: Montreal, Quebec
|
Senior Member |
|
|
Maybe you can try something like this
begin
go_block ('CHECK_SUB');
first_record;
loop
if :CHECK_SUB.CHECK_BOX = 'Y' then
INSERT INTO CHECK_SUB(MRR_NO,MRR_DATE,PARTY_CODE,CHECK_NO,CHECK_ISSUE_DATE, AMOUNT,
COMPANY_BANK_ID,BANK_NAME,ACCOUNT_NO,SUBMISSION_DATE)
VALUES (:CHECK_SUB.MRR_NO,:CHECK_SUB.MRR_DATE,:CHECK_SUB.PARTY_CODE,
:CHECK_SUB.CHECK_NO,:CHECK_SUB.CHECK_ISSUE_DATE,:CHECK_SUB.AMOUNT,:CHECK_SUB.COMPANY_BANK_ID,
:CHECK_SUB.BANK_NAME,:CHECK_SUB.ACCOUNT_NO,:CHECK_SUB.SUBMISSION_DATE);
end if;
exit when :system.last_record = 'TRUE';
next_record;
end loop
commit;
MESSAGE('The Selected Record Has been Inserted Successfully. Thank you');
end;
You can also try to put the commit just before the end loop. This way it can help you to see what is hanging in the database, exemple, the last record is insert 2000 time may indicate that the process is not able to exit the loop
[Updated on: Fri, 18 April 2008 14:37] Report message to a moderator
|
|
|