Create a button that will update a database table in apex - oracle-apex

I am trying to create a button that will update a database table. I am using Oracle Application Express (APEX) 20.2. What I have done so far is create a regular button and then create a process that contains my PL SQL code that would update the table. The process is attached to the button by specifying in the "Server-side Condition" attribute to execute the process when the button is pressed. This has not work and would appreciate anyone who has any knowledge of doing this.
So all in all I am just looking to run PL SQL code that will update a table when the button is pressed.
This is the button
APEX Button
This is the process
APEX Process
The process is attached to the button
APEX Process
After pressing the button, this is what I see in Debug mode in runtime
Debug mode
After I press the button the current page stays in loading mode
Loading mode
Error I get after waiting for the loading tab to finish
Error pic
I also tried using a dynamic action instead of a process but it did not work as well. Please see image of how I set the dynamic action.
Dynamic action

I think you are overcomplicating things.
Have you tried simply making a dynamic action that is triggered when the button is pressed.
Then you can have the action run PL/SQL code to do whatever you need.
If however what you are trying to do is update a table on the screen, then what you should try is making the button just submit the page. Then make a process with the editable region being the table you are working on, do the code in there. And in case you have other submits on the page that you dont want to trigger the code, just put in a button pressed condition in the process.

The problem that was causing my button not to work was that I had a session in TOAD open and I did not commit my current query in TOAD's editor. I had to commit my changes in TOAD so that TOAD would not lock the rows that the code of the button in my APEX app was using/accessing. I also want to point out that my button worked without having to attach a process to it, instead the button needed a dynamic action attached to it as #TineO suggested.

Related

How to display the status automatically/Refresh the field automatically after a JOB execution In Oracle Apex

I am executing a job via oracle Apex by clicking a button which is taking some times. Currently i am displaying a field as "STARTED" when the job started, once the job finished its update as "FAIL/SUCCCES" in a table. Placed another button to check the value from table for the status.so need to keep on press the button to know the status.
Is there any possible to refresh the field automatically/wait till once the table value will update either "FAIL" or "SUCCES".
better you can change the status like processing
Use javascript and set the value like processing. once job completed automatically page will refresh and show the success message.

Hide a region on initial page load, show after button is clicked

I am setting up a report on a page with multiple checkbox page items and start and end date page items. The user clicks a 'Run Report' button to generate a report region below on the page.
The default selections for the checkbox items are all items selected, and the Start and End Date items have default options based SQL queries.
I want to the report region to hide on the initial page load, and then show once the user clicks 'Run Report'. I tried the following solutions:
Set region condition to 'Never' and then use a dynamic action to show the region once the button is clicked. However, I think the 'Never' condition trumps the dynamic action.
Create two dynamic actions, one on page load to hide the region and on clicking the button to show the region. However, the show DA is always overwritten once the page loads again because of the first hide dynamic action, so the region never displays.
Has anyone else run into this problem? Any solutions? Thank you!
You may like to consider the 'lazy loading' described on Maxime's blog.
https://askmax.blog/2018/05/18/lazy-loading-report/
Like you said, a server side condition will trump and DAs that are showing/hiding on the browser, as the region would never render.
If you want to hide something on entry, you can do something similar to what you described, but I'm not quite sure what you've done.
on load dynamic action to hide region (or add
style="display:none;" to custom attributes of region.)
on click of your button, show the region (do not run on initialisation), and
refresh the region.

Disable text selection popup on Bigquery UI

Every time I'm composing queries in the BQ UI, if my mouse hovers over a column name after I've typed it in the query editor box it brings up the column name and type in a little window.
Does anyone know how to stop this happening as it's super annoying when trying to edit queries with the stupid popup constantly coming up??
screenshot:
Try using the BigQuery UI within the Google Cloud Platform Console as the query editor doesn't have the column information pop up. Keep in mind that as it's a beta release the popup may be present in future releases and consider its limitations.
I suggest opening a Feature Request about having an option to enable or disable this pop up within the Google Issue Tracker for both BigQuery UIs.

Oracle APEX : How to refresh the page after submit - before Branching

I have an APEX page, with a interactive report with Check boxes and a Button on top.
On click of button, It is performing some PLSQL process (on selected rows that are checked) and in a branch I'm invoking a Report Query which downloads a report in the pdf format.
But even after downloading the report, the report is not automatically getting refreshed.
Ideally I want to remove the processed rows from the report so as to avoid multiple processing by clicking the button continuously.
But since I have a branch that goes to download the report, it is not going to other branches that comes after in sequence to refresh the page.
Can anyone tell me how to refresh the page/or just that region after the processing? Thanks.

Deletion doesn't work for interactive report in Oracle Apex

I created an interactive report in APEX 5, and the CRUD operations work just fine. However, today, I find that the delete and update operations don't work anymore. When I hit the delete button, it just redirects to the main page as usual, and the there is a notification on the top right corner saying that Action Processed. However, that row is not really deleted. I checked the delete button, and the action is set to SQL DELETE action by default. I suppose I didn't touch any settings and the delete and update just simply don't work anymore, I am wondering if there is any way I can debug my app, so that I can find the problem here.
Thanks in advance for your help!