Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Basic form to display data

GRBOct 2 2013 — edited Oct 21 2013

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;;

This post has been answered by Paul Broughton on Oct 2 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2013
Added on Oct 2 2013
26 comments
1,528 views