5 Replies Latest reply on Feb 15, 2016 9:28 AM by PamNL

    Calling another block in Oracle Forms Development

    arunpr

      Dear All,

       

      Hope you are doing well.

       

      I have started learning the oracle form personalisation. I have been creating mandatory fields and validation for some of the fields in the below form which is mentioned in the screenshot. But i am stuck with one problem.

      I have enabled mandatory fields for First Name, Last Name, Contact Type, Phone Numbers and Email Address. But in this case when i enter First name and Last name without entering phone numbers and email address and saved it. The form is not asking for phone number as well as email address and saves the data.

       

      Can you kindly let me know how to call the trigger or phone number field once the last name is entered.

       

      forms.png

       

      Regards

      Arun Kumar

        • 1. Re: Calling another block in Oracle Forms Development
          PamNL

          The phone (and address) are actually seperate blocks .. you can enter client details without phones and addresses or with and it's a master-detail. In Contact Center you usually use 'Create Person' or 'Create Organization' button and what we did there is make the email address required at the contact level ..

          In Contact Center you have the advantage that you cannot directly create anything in the screen, but you have to use the create buttons.

          Can you see if there is a when-validate-record trigger firing if you save the first/last name? Maybe you can use that trigger and check if the phone is entered before the person can save?

          • 2. Re: Calling another block in Oracle Forms Development
            arunpr

            Thanks for the quick response, PamNL

            Actually if you see the header block each has been divided into different triggers.

            First Name & Last Name - AST_CU_PERSON

            Contact Type & Phone - AST_CU_PHONE

            Email - AST_CU_EMAIL

             

            As you have told i have personalized the WHEN-VALIDATE-RECORD Trigger Event and made a condition like When Last name is not null. Trigger object AST_CU_PHONE and made the Phone Number column as required one in the Actions.Moreover when i try to save the form by just entering the First name and Last Name. Its not throwing any error.

             

            Can you kindly suggest me in this. Hope the issue has been mentioned clearly. If please let me know i will clarify the issue clearly in the next p

             

            Thanks PamNL, Looking forward for your update.

             

            Regards

            Arun Kumar

            • 3. Re: Calling another block in Oracle Forms Development
              PamNL

              Can you show me a screenshot of what you've tried?

              I will try to replay your requirement .. what I would try first is something like

               

              WHEN-VALIDATE-RECORD

              Block: AST_CU_PERSON and another one on AST_CU_PHONE

              Condition

              :AST_CU_PERSON.Last_Name IS NULL OR :AST_CU_PHONE.PHONE_NUMBER IS NULL

               

              Action: Message with Error

              • 4. Re: Calling another block in Oracle Forms Development
                arunpr

                Hi PamNL,

                 

                I have made the personalization like below, I have called the Phone number block when Last_Name is not null. Let me know if i am wrong at anything.

                 

                Fe3.pngFe1.png

                Fe2.png

                 


                Thanks

                Arun

                • 5. Re: Calling another block in Oracle Forms Development
                  PamNL

                  Ok, so now it should fire when the Phone is validated and only if a last name is entered. That's what your personalization would you ...
                  And your personalization would mean it would Always show the message whenever the last name is entered .. where actually you want to check if the Phone number is entered and not null (at least that is what I think).

                  But if you don't enter a Phone it makes sense it's not validated, because the trigger on AST_CU_PHONE never fires ..

                   

                  I would build a personalization on AST_CU_PERSON with WHEN-VALIDATE-RECORD and condition

                  :AST_CU_PHONE.PHONE_NUMBER IS NULL OR :AST_CU_PERSON.LAST_NAME IS NULL

                   

                  If any of these are null you get a warning message. I would remove the required property on Phone number, since your message already validates when you try to save.

                   

                  Try this first .. then still it may not work if WHEN-VALIDATE-RECORD is not fired. So to be sure enable show custom events to see what happens if you try to enter invalid data. Then you know which events you can use and when.