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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Form query not executing in any circumstance

W PNov 25 2024

Hi, I'm using Apex 23.2 and I've got a field where you provide some input, order number for example. On submitting, I'd like it to go and fetch the data for that order and populate it into a form so the data can then be edited. The way I've got it right now is:

  • Text Field element in the body which has the Submit when Enter pressed action enabled. It is called P2_ORDERNUMBER
  • Form Region element in the body which has an SQL Query attached to it that uses the above
    • It is referenced in the query like :P2_ORDERNUMBER
    • It is included in the Page Items to Submit area like P2_ORDERNUMBER
    • The form has a primary key field
  • Process in Pre-rendering > Before Header > Processes for initializing the form, I've not changed anything here although have tried passing the primary key in as the Next Primary Key Item(s) and Previous Primary Key Item(s) items to see if it'd do anything
  • All the fields are mapped correctly

I've tried various things too with no success e.g.

  • Refreshing the form with a dynamic action
  • Using a button to submit instead of submitting on the text field
  • Hardcoding the parameters in the query
  • Using branching and passing the parameter in the query string and branching back to the same page

I have also checked the debug & state variables, where the state variables are set and I can see them set although I can never see the query for the form ever actually be called. Some of the info about the form region is in there, but never the actual SQL code so it's like it is never being called

My SQL statement is also valid as putting it into the SQL Workshop and replacing the parameters with the values I'm inputting does bring back data. I have also tried using a Classic report with the same query and in that case it works fine, so I believe it is to do with the form but I have no idea what.

Does anyone have any suggestions?

Thanks

This post has been answered by Marwa Chouchene on Dec 3 2024
Jump to Answer
Comments
Post Details
Added on Nov 25 2024
8 comments
129 views