Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Update table when user confirms
Your PL/SQL code should be like this: Declare v_cntr number; v_count number; v_pop_up number; begin update employee enddate = to_date(’08/18/2020′,’mm/dd/yyyy’) where emp_id = :P45_POP_UP; If sql%rowcount > 0 Then htp.prn(‘SUCCESS’); Else htp.prn(‘Error while updating table.’); End If; End; I amRead more
Your PL/SQL code should be like this:
I am assuming the page item P45_POP_UP is the employee id or if it is not then I think you should pass employee id page item to it.
See lessHow to update column when dialog is closed?
Hi Pavlos, You can disable the escape key for the dialog. Follow these steps: Open your dialog page and at the right side in the property section, under the Dialog section, you will find property Attributes. Add the following code in it: closeOnEscape:false Below is the screenshot:
Hi Pavlos,
You can disable the escape key for the dialog. Follow these steps:
Open your dialog page and at the right side in the property section, under the Dialog section, you will find property Attributes. Add the following code in it:
Below is the screenshot:
See lessUpdate table when user confirms
I am able to get the Updated Successfully message statement as per the logic if I remove the update sql statement from the ajax callback process v_link_update_1
I am able to get the Updated Successfully message statement as per the logic if I remove the update sql statement from the ajax callback process v_link_update_1
See lessUpdate table when user confirms
Hi Vinish, Second step worked fine. I am receiving confirmation message pop up. Now i want a table to be updated when user presses ok. apex.message.confirm(data,function( okPressed ) { if( okPressed ) { // do somethig if ok button pressed apex.server.process('v_link_update_1', { pageItems : 'Read more
Hi Vinish,
Second step worked fine. I am receiving confirmation message pop up. Now i want a table to be updated when user presses ok.
apex.message.confirm(data,function( okPressed ) {
if( okPressed ) {
// do somethig if ok button pressed
apex.server.process(‘v_link_update_1’,
{
pageItems : ‘#P45_POP_UP’
}
,
{
dataType : ‘text’, success : function(data)
{
if(data != ‘SUCCESS’) apex.message.alert(data);
}
}
below is the v_link_update_1
Declare
v_cntr number;
v_count number;
v_pop_up number;
begin
update employee
enddate = to_date(’08/18/2020′,’mm/dd/yyyy’)
where emp_id = ‘99609’ ;
select 10 into :CNTR_UPD_1 from dual;
If :CNTR_UPD_1 = 10 Then
htp.prn(‘Updated Successfully’);
See lessElse
htp.prn(‘SUCCESS’);
End If;
End;
Update table when user confirms
In the 2nd step, in which you are calling the Ajax process using the JavaScript code, put that JS code between the if condition, as shown in the below example: apex.message.confirm( "Confirm to update table B?", function( okPressed ) { if( okPressed ) { // add your JavaScript code here } }); Or if tRead more
In the 2nd step, in which you are calling the Ajax process using the JavaScript code, put that JS code between the if condition, as shown in the below example:
Or if this part is already working, then you can refer to the following post in which I have given an example to call the Ajax process using JavaScript.
Calling Ajax Process from JavaScript in Oracle Apex.
That example is related to the validation, you just ignore that part and use the PL/SQL code to update your table.
Let me know if any questions.
See lessHow to update column when dialog is closed?
Thanks, it works. Can I delete keyboard shortcut (esc)?
Thanks, it works. Can I delete keyboard shortcut (esc)?
See lessHow to update column when dialog is closed?
On your dialog page's cancel/close button change the DA action type to Close Dialog. Currently, it seems that it is set to Cancel Dialog, in this case, the parent page Close Dialog event will not fire.
On your dialog page’s cancel/close button change the DA action type to Close Dialog.
Currently, it seems that it is set to Cancel Dialog, in this case, the parent page Close Dialog event will not fire.
See lessHow to update column when dialog is closed?
I deleted X button, and DA on cancel button which is submit page, works now. But, user can close dialog using keyboard shortcut (ESC). I noticed that DA works only when page is submitted. I created demo app: https://apex.oracle.com/pls/apex/petarapex/r/test-da/home?session=127542306346046 Workspace:Read more
I deleted X button, and DA on cancel button which is submit page, works now. But, user can close dialog using keyboard shortcut (ESC). I noticed that DA works only when page is submitted.
I created demo app: https://apex.oracle.com/pls/apex/petarapex/r/test-da/home?session=127542306346046
Workspace: petarapex, User: test@test.com, Pass: test@test.com
The dialog opens when the user clicks on the ID.
See lessHow to update column when dialog is closed?
You can do one more thing. Hide the close (X) button of the dialog so that the user has to click on the Cancel/Close button to close the dialog. Add the following CSS to the parent page. In the page settings > Inline CSS: body .ui-dialog .ui-dialog-titlebar-close {display: none;} Note: Do not addRead more
You can do one more thing.
Hide the close (X) button of the dialog so that the user has to click on the Cancel/Close button to close the dialog.
Add the following CSS to the parent page. In the page settings > Inline CSS:
Note: Do not add the above CSS to the dialog page.
Even I used this approach sometimes.
See lessHow to update column when dialog is closed?
I understand your issue, that is what I am saying, you need to check your PL/SQL code. Because if on the parent page DA is working correctly using the JavaScript expression (window), or on the region, then you need to check your PL/SQL code only. Because if the event is firing correctly, then your PRead more
I understand your issue, that is what I am saying, you need to check your PL/SQL code.
Because if on the parent page DA is working correctly using the JavaScript expression (window), or on the region, then you need to check your PL/SQL code only.
Because if the event is firing correctly, then your PL/SQL code will be executed.
See less