Skip to main content

Posts

Showing posts from February, 2022

Free mentoring for Ukraine

I It is terrible what is currently happening in Ukraine. I would never say I will live on the edge of the war. Our nation was occupied by germans in 1938, 1939. The land was taken, lifes were lost. Than it was occupied by soviets from 1968 to 1991. We feel that devastation to this day. Specially the devastation of human character. Constant lies and propaganda. We remember. We feel the aggression from Russia as real threat. I wish EU would intervene swiftly and harshly, empty words will not help. Where is NATO? Where is ammunition for Ukraine? I decided to help Ukraine also professionally. If you are from Ukraine, affected by the war with Russia and you would like to start a career as an Oracle Developer or Oracle APEX Developer , then please reach out to me. I will try my best to help you build your career for free. My help is available in english or czech although. Fight back Ukraine.

DML error handling consolidated

O One of the most overlooked features of Oracle since Oracle 10g? DML error logging. When you insert/update/merge/delete data in a table, you might get an error if you are trying to insert string into a number column, if the string is too long, if the key is not valid... You will get an error message but you don't exactly know which column and value caused this problem. That's where you can leverage this feature. All you need to do is to: add 1 line at the end of your DML statement create error tables If you already know how this works, scroll down to My problem section, there is the twist. Magic line The one line you have to add looks like: LOG ERRORS INTO table_name_erros (your_tag) So your INSERT became like: INSERT INTO roles (role_id, role_name) VALUES ( 1, 'DEVELOPER' ) LOG ERRORS INTO err$_roles (123456); Same goes for other DML operations. Simple change in your code and huge difference on error. Error tables To creat...

Hide AJAX success messages after few seconds

I I want to close all success messages automatically after a short delay so I don't have to close them manually anymore. There are two ways how to get success (or error) message on a page. First is embedded into the page during the page rendering and it is easy to target these messages because they are part of the page source code. Second way is to get them from AJAX calls. These are more difficult to target, because they don't exists yet. You have to catch them when they are created. As you might guessed, the solution lies in JavaScript. I have a global.js file in workspace files (shared through all applications). With a help of Stack Overflow article I created a wait_for_element function. Then I added hide_success_message function and few comments. I believe the functionality is clear just from the names and comments. I had to do some #APEX_SUCCESS_MESSAGE element cleanup to make this work even if you receive multiple messages without page reload. // // WAIT FOR...