2018/4/24 APEX MeetUp #2 もっとAPEX
- 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するものです。
また、情報提供を唯一の目的とするものであり、いかなる契約にも組み込むことはできません。
以下の事項は、マテリアルやコード、機能を提供することをコミットメント(確約)するものでは
ないため、購買決定を行う際の判断材料になさらないで下さい。オラクル製品に関して
記載されている機能の開発、リリースおよび時期については、弊社の裁量により決定されます。
2
- 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
APEXと私
3
• 2008年10月 日本オラクルに新卒入社
- セールスコンサルタント(SC)としてOracle Direct (現Oracle Digital)に配属
• 2009年4月 はじめてAPEXをさわる
- Open World Tokyo のAPEXハンズオン補助要員として
- 新人ながらAPEXに感動 & 製品開発チームの方と交流
データベース製品を中心としたSC業務のかたわら、
部内システムのAPEX化やらAPEX提案やら
ほそぼそとAPEX普及活動に勤しみつつ、愛を深める
• 2015年 SCから営業企画に社内ジョブチェン
- SCという立場でAPEX提案等はないものの、引き続き
APEX製の部内システム管理やらデマジェン活動でAPEXと関わり多し
• 現在 もはやライフワーク化したAPEXで旦那のこずかい管理をしてやろうとたくらみ中・・・
- 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
今回のテーマ – 以下3コンポーネントの中身を解説
4
- 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
今回のテーマ – 以下3コンポーネントの中身を解説
5
- 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
活用度ナンバーワン!積み上げチャート
属性
• チャートタイプ:棒
外観
• 向き:縦
• 積み上げ:はい
シリーズ
• APEXの積み上げチャートは
シリーズ毎に積み上げられます
• 製品ごとに右の5つを用意
• 各シリーズの設定例は以下
- 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
ここ注意!積み上げグラフでGROUP BY
7
select
customer,
sum(case when product = 'Cloud Tablet' then revenue else 0 end) as total_rev,
'Cloud Tablet' as series
from orderlist
where customer like ('%' || 'プラザ石渡' || '%')
group by customer
select
customer,
sum(revenue) as total_rev,
'Cloud Tablet' as series
from orderlist
where customer like ('%' || 'プラザ石渡' || '%')
and product = 'Cloud Tablet'
group by customer
POINT
値が返らない場合もゼロが返ってくるようにしないと、
うまく積み上げグラフが作れません。
NGOK
- 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
今回のテーマ – 以下3コンポーネントの中身を解説
8
- 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
社内で好評!なみなみチャート
9
これ、プラグインなんです~
https://apex.world/ords/f?p=100:710:::::P710_PLG_ID:COM.FARZAD.APEXGAUGE
- 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
なみなみチャートの使い方
10
1. プラグインを入れる
2. プラグインを表示したい値が入るアイテムを作成 (左図)
3. プラグインのアイテムを作成 (右図)
select
-- 合計受注額 / 目標受注額(1億円)
sum(revenue)/100000000 as value,
0 as min_value,
100 as max_value
from "ORDERLIST"
- 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
補足:クールに数字を魅せるなら、プラグインがおすすめ
11
https://apex.world/ords/f?p=100:710:::::P710_PLG_ID:COM.PLANETAPEX.KPI_NUMERIC_CARDS
KPI Numeric Card (1.0)
- 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
今回のテーマ – 以下3コンポーネントの中身を解説
12
- 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
地味に使いどころ多し!リストを使ったダッシュボード表現
13
リストのアイテムの作り方
1. 予め、共有コンポーネントに
リストを作成しておく
2. 作成したリストを選択した
リストタイプのアイテムを作成する
作成したリスト:TOP3ランキング
- 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
作成したリストの中身について
14
SELECT
null as "level",
'#' || R || ' ' || SR_NAME as "label",
apex_page.get_url(p_page => 21, p_items =>'P21_EMPID', p_values => EMP_ID) as "target",
null as "is_current_list_entry",
null as "image",
null as "image_attribute",
null as "image_alt_attribute",
(TOTAL_REVENUE/1000000) || 'M' as "attribute1“
FROM ***
クリック
- 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
リスト・アイテムの中身について
15
アイテム構成
• タイプ:リスト
• ソース:共有コンポーネントにあるリストを選択
属性
• リスト・テンプレート:Badge List
リスト・テンプレートはBadge以外にはいろいろあります。
各リスト・テンプレートがどういう構成なのか確認するには、パッケージ・アプリケーションの
Universal Theme Sample Applicationがオススメです。
- 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
リンクの蛇足話 – Interactive Report リンク活用のススメ
16
ススメ1: パブリックレポートを作成して、共有する
- フィルタ条件やカラム表示設定、計算列など、カスタマイズした状態の対話モードレポートを共有できるレポート
- デフォルトでは使用できない状態ですが、対話モードレポートの属性設定を変更するだけで使えます(下参照)
1. パブリックレポートを作成する
• 普段どおり、対話モードレポートでフィルタなど設定し、
[パブリック]にチェックを入れてレポートを保存する。
2. パブリックレポートを共有する
• 開発画面からパブリックレポートへのダイレクトアクセスURLを確認する
• 分かりやすく、別名を付けておくことも可能
サンプルURL
https://apex.oracle.com/pls/apex/f?p=14871:15::IR_ORACLE_PAD
- 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
リンクの蛇足話 – Interactive Report リンク活用のススメ
17
ススメ2:フィルタ条件をつけたURLで、共有する
- 同一レポートで条件フィルタ指定で共有できるので、レポート大氾濫による管理不能状態を防ぐのに使えます!
- 詳しくはマニュアル下部参照
- 注意:このリンク活用は、ユーザー認証の利用が必須です。また、ディープリンクを有効にしておく必要もあります。
1. APEX アプリケーションのURL構成の理解
- http://サーバーのドメイン名/pls/apex/f?p=アプリケーションのID:ページ番号:セッション番号
2. ここに、対話モードレポートのURL中に検索値を設定する
- 設定する場合の規則はコチラ参照
- 例:Oracle Productがxxxxのものだけ
https://apex.oracle.com/pls/apex/f?p=14871:15::::RIR:IRC_PRODUCT:Oracle+Phone
- 補足:IRC_***の前につけているRIRをつけることで、対話モードレポートで設定された条件をデフォルトに戻せます
3. 更に応用して、CSV直DLも可能
- そのままCSVで落とす https://apex.oracle.com/pls/apex/f?p=14871:15::CSV
- 条件つけて落とす https://apex.oracle.com/pls/apex/f?p=14871:15::CSV::RIR:IRC_PRODUCT:Oracle%20Phone
- 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
情報はこちら
18
• Oracle Application Expressアプリケーション・ビルダー・ユーザーズ・ガイド リリース5.1
2.7 URL構文の理解
https://docs.oracle.com/cd/E86255_01/HTMDB/understanding-url-syntax.htm#GUID-
F9B81EAF-D33F-401D-8349-3952DEDA5460
• Application Express Community
https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/5121/index.html
補足:ドイツ語です
• Understanding the APEX url - passing variables to items and (interactive) reports
http://dgielis.blogspot.jp/2015/01/understanding-apex-url-passing.html
補足:英語です
- 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
ご清聴ありがとうございました
19