Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Save to Session State

Staš ČarfApr 14 2025

Hello!

I have an interactive grid with a date column PSRN. On selection change I have a dynamic action

"const region = apex.region("IG_PS");
const gridView = region.widget().interactiveGrid("getViews", "grid");
const selected = gridView.getSelectedRecords();
if (!selected.length) {
   return;
}
const rawDate = selected[0][13];
if (!rawDate) {
   return;
}
const [day, month, year] = rawDate.split(".");
if (!day || !month || !year) {
   return;
}
const formattedDate = `${day.padStart(2, "0")}.${month.padStart(2, "0")}.${year}`;
$s("P4_PSRN", formattedDate);
apex.server.process("StoreToSessionState", {
   pageItems: "#P4_PSRN"
}, {
   dataType: "text", 
});"

And an ajax callback process with just “Null;”. I've tried many other ways but nothing seemed to work for some odd reason. Even this doesn't work as I'd want it to. When I select a row I can see in session state that the value is what it should be, but when I press the button to pass the value, it doesn't work UNLESS I refresh the page first. I want to know if the problem lies with this set up, or how my button is set up - redirect to page in the same application.

Thanks for any help!

Comments
Post Details
Added on Apr 14 2025
2 comments
76 views