Oracle APEX vs SQL Commands/database execution - default conversion
Oracle APEX vs SQL Commands/database execution - default conversion
Oracle APEX Classic report Card template - card link
$('.t-Card-title a').each(function(index) {
lnk = $(this).attr('href');
$(this).closest('.t-Card-wrap')
.attr('data-href', lnk)
.click(function(){
window.location=$(this).attr('data-href');
})
.mouseover(function(){
$(this).css('cursor', 'pointer');
})
.mouseleave(function(){
$(this).css('cursor', 'default');
})
});
APEX page Item type Number - Format and alignment vs Read Only
var errors = [];
allItems = apex.page.forEachPageItem;
allItems(
$("#wwvFlowForm"),
function (el, name) {
if (
apex.item(name).isChanged() &&
!apex.item(name).element[0].classList.value.includes("js-ignoreChange")
) {
errors.push({
message: "This item has unsaved changes", location: "inline",
pageItem: name,
});
}
},
true
);
apex.message.clearErrors();
apex.message.showErrors(errors);
ORACLE APEX page item Text Case setting
.apex-item-text::-webkit-input-placeholder { /* WebKit browsers */ text-transform: none; }
.apex-item-text:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ text-transform: none; }
.apex-item-text::-moz-placeholder { /* Mozilla Firefox 19+ */ text-transform: none; }
ORACLE APEX Application item with global scope
Simple use case - we have two apps that share authentications and now we want to pass the application items value between these two.
For a long time now APEX application definition had this feature where we can declare global application items.
But what does it actually mean and how do we actually do this when there are more apps in place?!!
Create an app, add an application item to it with a global scope. Have some way of setting this item to a certain value. So far so good.
Okay now we can create a link to an app #2 where we will try to read this value out.
Of course first thing we would need to do, is we need to set and align both Authentication Schemes to share their cookies. This way we do not get ask to re-login. We all knew this so far.
In application #2 create a region and simply reference globally set application item from an app 1 using substitution variable syntax. In my example this would be &APP_GLOBAL_ITEM.
In order to get this going the point is that you have to have the same application item created in both of these apps. Else it could leave you wondering what you have done wrong.
Thanks Mark G. for bringing this to my attention and here is a reference to existing post with the same topic.SLino
ORACLE APEX Dynamic action - apex.item and this.triggeringElement
If you ever wanted to trigger your DA based on an item that is a select list here is a quick read.
Scenario here is we want to trigger an action when item we interacted with contains a certain string like NBME in my case. How would we do this?
To be 100% correct we want to check it against the item display value and not its return value (one hidden from the end users).
I strongly encourage you to visit apex.oracle.com/jsapi for a full reference of apis available to us.
We all know about apex.item api which can easily give us the value of the item with something like apex.item("PX_TEST_CODE").getValue()
Problem here is that if we were to do this we would have gotten a value of return value from my select list item and not the one we are using as display.
Fair enough we have also a function called displayValueFor() which sounds like our thing.
If we pack it all together on our DA Client side condition we can do JavaScript expression with following code:
apex.item(this.triggeringElement)
.displayValueFor(apex.item(this.triggeringElement).getValue())
.includes('NBME')
What this will do is take our a return value of triggering element then it will get a display value of it in an item that is triggering it. At the end it will check it if it includes NBME string and return true or false as a result of it all.
It seemed I was coming back to it a few times so wanted to write it down somewhere.
Happy APEXing,
SLino
ORACLE APEX Security - APEX SERT 23.1
Kscope has passed and I managed to get some time to do this.
A new version of APEX SERT for APEX 23.1 has ben made available for download.
Anyone who is on APEX 23.1 version this is the SERT version you want to be on.
Install, share and provide feedback ;)
Happy APEXing,
SLino
p.s. will be working to get this onto the original repo soon