Home » Developer & Programmer » Forms » Please help me its urgent
Please help me its urgent [message #330211] Fri, 27 June 2008 23:49 Go to next message
Shaheer
Messages: 50
Registered: June 2008
Location: Pakistan
Member
i am attaching a Form. This Form contain 3 blocks naming (:M)(:F) and (:S). As showing in attach file Block (:F) is multi entry block. My problem is, i want to restrict user to avoid enter duplicate Account_Code in (:F) block. Please help me how to solve this problem. please post sample code.
  • Attachment: help.GIF
    (Size: 64.23KB, Downloaded 486 times)
Re: Please help me its urgent [message #330220 is a reply to message #330211] Sat, 28 June 2008 00:44 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Hi Shaheer,

See the coding apply as per your requirement.

procedure Scrn_duplicate is

Begin
 
   Declare
         Rec_no Number;
         Acccode Char(5);

   Begin
        Rec_no  := :System.Cursor_Record;
        Acccode := :YourFormname.Account_code;

        First_record;

        :global.dummy := '   ';        
        Loop

            If :System.Last_record = 'TRUE' then
                exit;
            End If;
            If :System.Cursor_Record = Rec_no Then
               exit;
            end if;
            If :YourFormname.Account_code = Acccode Then
                Messager('Duplicate Entry');
                :global.dummy := 'Error';
                exit;
            End If;
          Next_record;
        End Loop;
  End;
End;


kanish



Re: Please help me its urgent [message #330237 is a reply to message #330220] Sat, 28 June 2008 02:39 Go to previous messageGo to next message
Shaheer
Messages: 50
Registered: June 2008
Location: Pakistan
Member
Thanks Sir,

what kind of trigger i use for this code. Kindly see my above attach file and tell me in which FIELD i add trigger for this code.
Re: Please help me its urgent [message #330239 is a reply to message #330211] Sat, 28 June 2008 02:52 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

That code is procedure.

So you want to create program unit for procedure.

and modify the procedure as per your requirement.

then Call the procedure Key_next_item of that text where you dont required duplication.

kanish
Re: Please help me its urgent [message #330243 is a reply to message #330239] Sat, 28 June 2008 03:04 Go to previous message
Shaheer
Messages: 50
Registered: June 2008
Location: Pakistan
Member
Thank you very very very much Sir,

I solve my problem using your's Instructions.
Previous Topic: Jacob.jar/WEBUTIL ERROR-Urgent Help Needed
Next Topic: How make a block of base view in form?(can't coding in trigger)
Goto Forum:
  


Current Time: Sun Feb 09 06:34:13 CST 2025