Dynamic Actions making the difference! This marketing slogan belongs to the fact that the quality and usage of dynamic actions in your application influencing the user experience a lot. It helps to improve the functionality and let the users believe, that they work with a desktop application instead in browser window.
Someday ago I’ve tried to create a dynamic action where a button should be visible or not. I found out that the standard APEX-conditions are not sufficient for me. In detail I had to check two items. The first called P38_DATACENTER shouldn’t be empty OR the second item P38_OPTION must be equal to the string “share”. Unfortunately this condition isn’t possible with out-of-the-box conditions, whether in APEX 4.2 nor in 5.0:So I’ve used Javascript Expression with success 🙂 Luckily Oracle had created many Javascript APIs fullfilling all your wishes. Have deeper look here Miscellaneous Javascript APIs
$v( 'P38_OPTION' ) === 'share' || !$v_IsEmpty('P38_DATACENTER' )
$v( ‘P38_OPTION’ ) === ‘share’Â Â (Item equal string=’share’)
|| (OR-operator)
!$v_IsEmpty(‘P38_DATACENTER’ )Â (check if Item is not empty/null)