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!

Passing items to Modal Dialog

FlammiferJan 14 2018 — edited Jan 15 2018

Sometimes APEX just confuses me.

I am simply passing the page value to modal dialog when using link from button. Setting values there with values on this page.

Doesn't work, blank.

I have select list, which passes its value to item on modal (of course, I use 'Always, replace any...') .

If I use static value for any item, as a source, and pass from this page to modal via link, then it will get there and set modal's item. But if its a select list as a source item, then no.

I am 100% this should work and has always worked.

EDIT: this is insane, because, say I have Display Only item on page 1...
I use static as Source and write 1234. If I link to modal page and set some value there with this value... It will show 1234 in modal dialog item.
But if I use PL/SQL expression as source for item on Page 1, and use : P01_SOME_SELECT_LIST  and pass this to modal, then modal item will be empty. But here's the catch - on Page 1 I can actually see that item really has a value of SOME_SELECT_LIST.

I don't understand this. Is this a bug?

Comments

thatJeffSmith-Oracle

Good luck!

I would advise you to upgrade your SQL Developer first. Version 4.0.1 is quite old.

VGA

Hi Jeff,

Unfortunately this is not up to me. Company rules.

For every update we need to get in touch with the IT department and that takes ages.

Any hints/tips to help me with my task?

Regards,

George

BPeaslandDBA

This is not a SQL Dev question, but more a SQL question, the SQL language, not the SQL Dev product. This might be a better space for this question:

19:00 hours yesterday is midnight today minus 5 hours. So this gives me 19:00 yesterday: TRUNC(sysdate)-5/24 and an example is here:

SQL> SELECT to_char(sysdate,'MM/DD HH24:MI') AS curr_time,

  2  to_char(trunc(sysdate)-5/24,'MM/DD HH24:MI') as yesterday_1900

  3  FROM dual;

CURR_TIME  YESTERDAY_1

----------- -----------

10/10 09:26 10/09 19:00


that works because there are 24 hours in a day and 5 hours is 5/24.

If you want 23:59 more than 19:00 yesterday, you just add that much of a day. In this case, there are 1440 minutes in day and i want to add 1/1440:

SQL> SELECT to_char(sysdate,'MM/DD HH24:MI') AS curr_time,

  2  to_char(TRUNC(sysdate)-5/24,'MM/DD HH24:MI') AS yesterday_1900,

  3  to_char(TRUNC(sysdate)-5/24+1-1/1440,'MM/DD HH24:MI') AS today_1859

  4  from dual;

CURR_TIME   YESTERDAY_1 TODAY_1859

----------- ----------- -----------

10/10 09:31 10/09 19:00 10/10 18:59

Cheers,
Brian

thatJeffSmith-Oracle

Not on this forum. And if you post in on the forum you're not likely to get much help either, not without a lot more details. Like, what your table/data looks like. You should also try to post your best attempt at the SQL first. No one there is going to be motivated to write it for you.

As for your IT department - I don't want you to get in trouble with them. But, there is no installer here. Just grab the zip, unzip it to your desktop, and go. Otherwise you're on yesterday's tech, if yesterday was 2013.

VGA

Thanks a lot Jeff!

unknown-7404
This query will be added in a report that get's refreshed on a daily basis but at different hours so can't use sysdate - 1.

So use 'TRUNC(sysdate) - 1'.

If you need more help mark this thread ANSWERED and repost the question in the sql and pl/sql forum.

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 12 2018
Added on Jan 14 2018
4 comments
3,348 views