{"id":115,"date":"2016-08-08T17:05:07","date_gmt":"2016-08-08T14:05:07","guid":{"rendered":"http:\/\/geekinto.com\/?p=115"},"modified":"2016-08-08T17:11:41","modified_gmt":"2016-08-08T14:11:41","slug":"oracle-apex-open-multi-dialog-page-from-classic-report","status":"publish","type":"post","link":"https:\/\/howoracleapex.com\/?p=115","title":{"rendered":"Oracle Apex: Open multi dialog page from classic report."},"content":{"rendered":"<p>Asalamo Alikom ..<\/p>\n<p>I have a classic report like department list<br \/>\nand i want to link a report column with multiple modal page and its depend on every single department.<br \/>\nLike when i click on &#8216;IT&#8217; department then open a modal page and when i click on &#8216;Sales&#8217; department then open different modal page. I need this solution!<br \/>\nRegards..<\/p>\n<p>Steps..<br \/>\n1- create spicial modal page for every department (It, Sales, &#8230;).<br \/>\n2- create new column into department table is &#8220;dept_modalPageId&#8221;<br \/>\n3- create modal page for sales and emp and insert\u00a0page id \u00a0into dept_modalPageId column .<br \/>\n4- put dept_modalPageId value = &lt;Dialog page id&gt;<br \/>\n5- create function ..<\/p>\n<pre class=\"lang:default decode:true \">create or replace function fun_get_url(p_page_no number,itm_nm varchar2, itm_val varchar2)\r\n\treturn varchar2\r\n\tis\r\n\t   v_url   VARCHAR2 (4000);\r\n\t   x_itm_nm VARCHAR2(200);\r\n\t   x_itm_val VARCHAR2(500);\r\n\tBEGIN\r\n\t\t-- configuration --\r\n\t\tif itm_nm is not null\r\n\t\tthen x_itm_nm := itm_nm;\r\n\t\tend if;\r\n\t\t\r\n\t\tif itm_val is not null\r\n\t\tthen  x_itm_val := itm_val;\r\n\t\tend if;\r\n\t\t--\r\n\t\t\r\n\t   v_url :=\r\n\t\t  apex_util.prepare_url\r\n\t\t\t\t\t\t  (p_url=&gt;    'f?p='\r\n\t\t\t\t\t\t\t\t\t\t|| v('app_id')\r\n\t\t\t\t\t\t\t\t\t\t|| ':' ||p_page_no || ':'\r\n\t\t\t\t\t\t\t\t\t\t|| v('app_session')\r\n\t\t\t\t\t\t\t\t\t\t|| ':::'\r\n\t\t\t\t\t\t\t\t\t\t|| p_page_no || ':' --To clear cache page\r\n\t\t\t\t\t\t\t\t\t\t|| x_itm_nm \r\n\t\t\t\t\t\t\t\t\t\t||':'\r\n\t\t\t\t\t\t\t\t\t\t|| x_itm_val\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\t   RETURN v_url;\r\n\tEND;<\/pre>\n<p>6- classic report regin is ..<\/p>\n<pre class=\"lang:default decode:true \">select DEPTNO,\r\n       DNAME,\r\n       LOC,\r\n\t   \r\n\t   -- pass dialog page id into function to return full URL to dialog page..\r\n       case when DEPT_MODALPAGEID is null then null else fun_get_url(DEPT_MODALPAGEID,null,null) end as dialogPage\r\n       \r\n  from DEPT<\/pre>\n<p><a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-08-160157.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-116\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-08-160157.png\" alt=\"Screenshot from 2016-08-08 16:01:57\" width=\"1179\" height=\"465\" \/><\/a><\/p>\n<p>7- on DIALOGPAGE column (HTML Expression)put this code to handling button to fire dialog page..<\/p>\n<pre class=\"lang:default decode:true \">&lt;span class=\"t-Button   t-Button--warning\" type=\"button\" onclick=\"#DIALOGPAGE#\"&gt;Click me&lt;\/span&gt;<\/pre>\n<p><a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-08-160229.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-117\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-08-160229.png\" alt=\"Screenshot from 2016-08-08 16:02:29\" width=\"1169\" height=\"334\" \/><\/a> <a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-08-160251.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-118\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-08-160251.png\" alt=\"Screenshot from 2016-08-08 16:02:51\" width=\"755\" height=\"558\" \/><\/a><\/p>\n<p>You can see sample @<br \/>\nhttps:\/\/apex.oracle.com\/pls\/apex\/f?p=78167:5<br \/>\nUser: help<br \/>\nPass: help<\/p>\n<p>Try press on &#8220;Click me&#8221; button into sales and emp row.<\/p>\n<p>I like OracleApex..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Asalamo Alikom .. I have a classic report like department list and i want to link a report column with multiple modal page and its depend on every single department. Like when i click&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,15,12,2,5],"tags":[24],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-apex","category-css","category-jscript","category-oracle","category-sql","tag-dialog_page"],"_links":{"self":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=115"}],"version-history":[{"count":3,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}