Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Apex Button Submitting Page instead (Apex 3.2.1 )
Apex Button Submitting Page instead [message #526236] Mon, 10 October 2011 05:06 Go to next message
Jemo
Messages: 5
Registered: October 2011
Location: Nairobi
Junior Member
Hi All,
Am also new in Oracle Application Express but my Boss is insisting that I develop an intranet using Apex. I have many problems and I would like some help from you since in Kenya its difficult to get some proper training on it.

My current issue is to do with buttons. I want to create a page that when I type an employee Id, the employees details will be displayed from the master table and only the employee id will be saved in the transaction table. But when I create a button to populate the form,it automatically goes to save page and since some columns are "not null columns", an error comes. In short, I want the button to only populate the form but not to submit the page. Could you be kind to help.

Thanks
Re: Apex Button Submitting Page instead [message #526259 is a reply to message #526236] Mon, 10 October 2011 06:29 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If your goal is to simply display employee's details, perhaps you'd rather go with an interactive report (instead of a form you are using now (at least, that's what I understood)).
Re: Apex Button Submitting Page instead [message #526270 is a reply to message #526259] Mon, 10 October 2011 06:56 Go to previous messageGo to next message
Jemo
Messages: 5
Registered: October 2011
Location: Nairobi
Junior Member
Thanks Littlefoot,

But my issue is more than that..My aim is for the person doing data entry to be able to view the staff details and then key in the transaction in a different region. Eg

The program should display the following from the master table

Staff Id :9999
Staff Names :XXX XXX
Staff Balances 999 9999 9999

Below the clerk should key in new transaction details which goes to a different transaction table with the staff id as the foreign key
Transaction Date:
Transaction Code:
Transaction Amount:


Re: Apex Button Submitting Page instead [message #526271 is a reply to message #526270] Mon, 10 October 2011 07:00 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In that case, perhaps you could create a Form on a Table with Report page. Report would allow you to view current data (staff details), and then - using the link - go to a Form and enter new data.
Re: Apex Button Submitting Page instead [message #526440 is a reply to message #526271] Tue, 11 October 2011 02:19 Go to previous messageGo to next message
Jemo
Messages: 5
Registered: October 2011
Location: Nairobi
Junior Member
Hi Littlefoot,

Hope you have not given up on me. Thanks for the help and I tried as you advised. But I noticed that "a Form on a Table with Report page" will only accept one table.Am using two tables for staff details and a transaction table..I need to get the master details from the first table and populate the second table with the staff_id and the transaction details.
Thanks
Re: Apex Button Submitting Page instead [message #526443 is a reply to message #526440] Tue, 11 October 2011 02:30 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, you could create items (for information that should be inserted into the "second table") that don't belong to a table. Then create a button and write a [i]process]/i] that is called when that button is pressed; the process would perform INSERT INTO operation for the "second table" items.
Re: Apex Button Submitting Page instead [message #526475 is a reply to message #526443] Tue, 11 October 2011 04:28 Go to previous messageGo to next message
Jemo
Messages: 5
Registered: October 2011
Location: Nairobi
Junior Member
Hi Littlefoot,

When I press the button it submits the form rather than the action am requesting it to do. Where do I put the button instruction?
Re: Apex Button Submitting Page instead [message #526479 is a reply to message #526475] Tue, 11 October 2011 04:33 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
When a process is created, there's the "Conditions" property that says "When Button Pressed (Process After Submit When this Button is Pressed)" - set it to your button's name.

P.S. Please, note that my Apex version is 4.0 so *maybe* not everything works the same as in your version.
Re: Apex Button Submitting Page instead [message #526535 is a reply to message #526479] Tue, 11 October 2011 08:55 Go to previous message
Jemo
Messages: 5
Registered: October 2011
Location: Nairobi
Junior Member
Hi,
Thanks Littlefoot, I have decided to try another way in which I have two forms. The first form is only for keying the Staff_id with a condition of "Always submits page when Enter is pressed" and then branching it to the second page that should display the details from the first table and have columns for updating the second table. It should therefore find the session_id from the first page then it will display the page and extra columns for data entry. My problem now is to transfer the parameter session from the first screen to the next screen so that it will be saved together with the data on the second page. Please note that that tables in page 1 is different from the table of page 2.
Previous Topic: Reporting tool for APEX
Next Topic: How to save :app_user to a column like update_by when recode update?
Goto Forum:
  


Current Time: Tue Oct 27 05:07:26 CDT 2020