Home » Developer & Programmer » Forms » How to save multiple entry having checked box and Check box problem (merged)
How to save multiple entry having checked box and Check box problem (merged) [message #314560] Thu, 17 April 2008 03:03 Go to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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 Go to previous messageGo to next message
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 #315055 is a reply to message #315053] Fri, 18 April 2008 14:17 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Thank you,
the problem is when i tried to save all no record is inserted and the system hang up by uisng 100% of its resources.May be the loop that i have used is not ended up properly. Even no record is saved at all. What ro do now?

Thank you
Mahatab
Re: How to save multiple entry having checked box [message #315057 is a reply to message #314560] Fri, 18 April 2008 14:31 Go to previous message
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

Previous Topic: Oracle Alert logs ? ? ?
Next Topic: Hide username and password in URL
Goto Forum:
  


Current Time: Thu Dec 08 04:03:25 CST 2016

Total time taken to generate the page: 0.07514 seconds