1 2 Previous Next 26 Replies Latest reply: Oct 21, 2013 8:24 AM by Paul Broughton RSS

    Basic form to display data

    GRB

      Hi,

      just getting started with Apex and I'm trying to achieve something that I think should be easy; it must be as I can't see any questions about it anywhere!
      I'm using Apex 4.1 on Windows 7.
      I have created a form based on a query that should return personal details when provided with a customer ID.
      I've added a textbox on the form to hold the customer ID.
      I have removed all the CRUD buttons and added a submit button, which submits the form.
      When I enter an ID and click submit, I get 'no data found', but it should, so my form/process is obviously wrong; I expected the form to refresh the query and display the data
      I also have a few report regions that I want to also refresh, based on the customer ID, to create a dashboard for a user.
      Can someone point me in the right direction? It doesn't appear to me that Apex RAD is quite the RAD I was expecting.

      Apex created the form as HTML text and there was nothing in the region source; I couldn't find the original query I had entered anywhere.
      I have changed it to a PL/SQL anonymous block without success.
      The PL/SQL is below; :CM_NUMBER is the textbox.

       

      I appreciate that I am probably being extremely thick here - apologies.

      Thanks.

       

      begin
      SELECT TC.CODE_DESCRIPTION || ' ' || TI.GIVEN_NAME || ' ' || TI.FAMILY_NAME NAME
           , TC2.CODE_DESCRIPTION STATUS
           , TI.BIRTH_DATE BORN
           , FCP.CURRENT_AGE
           , TC4.CODE_DESCRIPTION GENDER
           , TC3.CODE_DESCRIPTION MARITAL_STATUS
           , NVL(TO_CHAR( FCP.NUMBER_OF_CHILDREN), 'Unknown') CHILDREN
           , TA.ADDRESS_LINE1_TEXT
           , TA.ADDRESS_LINE2_TEXT
           , TA.ADDRESS_LINE3_TEXT
           , TA.POST_TOWN_TEXT
           , TA.COUNTY_NAME_TEXT
           , TA.POST_CODE_OUT_TEXT || ' ' || TA.POST_CODE_IN_TEXT POSTCODE
      into :p1_NAME
           , :p1_STATUS
           , :p1_BORN
           , :p1_CURRENT_AGE
           , :p1_GENDER
           , :p1_MARITAL_STATUS
           , :p1_CHILDREN
           , :p1_ADDRESS_LINE1_TEXT
           , :p1_ADDRESS_LINE2_TEXT
           , :p1_ADDRESS_LINE3_TEXT
           , :p1_POST_TOWN_TEXT
           , :p1_COUNTY_NAME_TEXT
           , :p1_POSTCODE
      FROM   EXII.T_INDIVIDUAL TI
           , EXII.T_CODES TC
           , EXII.T_CODES TC2
           , EXII.T_CODES TC3
           , EXII.T_CODES TC4
           , F_CUST_PROFILE FCP
           , EXII.V_CURRENT_MAILING_ADDRESS VCMA
           , EXII.T_ADDRESS TA
      WHERE  TI.PARTY_ID = :CM_NUMBER
      AND    TI.TITLE_CODE_ID = TC.CODE_ID
      AND    TI.INDIVIDUAL_STATUS_CODE_ID = TC2.CODE_ID
      AND    FCP.MARITAL_STATUS_CODE_ID = TC3.CODE_ID
      AND    FCP.GENDER_CODE_ID = TC4.CODE_ID
      AND    TI.PARTY_ID = FCP.PARTY_ID
      AND    TI.PARTY_ID = VCMA.PARTY_ID
      AND    VCMA.ADDRESS_ID = TA.ADDRESS_ID;
      end;;

        1 2 Previous Next