Tuesday, June 24, 2014
My Early Departure From Kscope 14
If you've ever had a concussion before then you'll know what I'm going through. The only way to recover is to rest in a quite location for as long as it takes. I had hoped for a speedy recovery but that just isn't going to be the case for me.
I want to thank everyone for coming to Kscope 14 and I hope you enjoy your time at the conference. For those looking to attend my presentations, I sincerely apologize for cancelling at the last minute. I will try to do a webinar on Logger when I'm feeling better and time permits.
See everyone at Kscope 15!
- Martin
Thanks to all those that have sent me messages. I need to keep my screen time to a minimal and will reply later on.
Saturday, June 21, 2014
#TourKscope
@cheesecake Factory right across the street from hotel. Come hungry, servings are big! #tourkscope #Seattle pic.twitter.com/Uim7sV5YY6
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
About 10 min walk from conf center is @seattleu Really nice campus, a must see. #tourkscope pic.twitter.com/XU4IJL6kwT
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Though a bit away from the core, @skilletstfood is a must to eat at. Breakfast was AMAZING! #tourkscope pic.twitter.com/CVSe9SoKVS
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
@skilletstfood breakfast menu. If you don’t get hungry reading it, don’t know what will! #tourkscope pic.twitter.com/657xsaleru
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Though @stabucks is everywhere in #seattle, nice to try some local shops. @VictrolaCoffee was very nice #tourkscope pic.twitter.com/Dyz8000Y7Y
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
They even roast their own coffee! #tourkscope @VictrolaCoffee any chance to get a tour at end of June? pic.twitter.com/TJTuQwa37D
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
@SheratonSeattle lobby. Great place to network and have quick meetings at #kscope14 #tourkscope pic.twitter.com/VJrTPfAPya
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
You won’t go hungry at #kscope14. Chicken pot pie from restaurant. @SheratonSeattle #tourkscope pic.twitter.com/2DH3q4dg1m
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
First is @SeattleYMCA This gym has character! No lollygagging allowed #tourkscope pic.twitter.com/BNYpArFEOu
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
@SeattleYMCA is only 8 min walk away from @SheratonSeattle #tourkscope pic.twitter.com/gkMhy9pVe3
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Fun Fact: You’ll pass by 2 @starbucks between @SheratonSeattle and @SeattleYMCA #tourkscope #coffeecentral pic.twitter.com/1Dg48wV1PJ
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
If u want to train in the hotel, @SheratonSeattle has a great gym on 35th floor. #tourkscope pic.twitter.com/0obVzAYFXY
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
@SheratonSeattle Gym open 24 hrs! #tourkscope For people w. jetlag, great way to pass time. pic.twitter.com/CEKlnoi2cm
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Though I don’t think the pool @SheratonSeattle is open 24hrs. Still nice to have a pool right there. #tourkscope pic.twitter.com/FzsqpnqfAu
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
#kscope14 conference center right across the st from hotel. Will look much nicer in summer w. sun. #tourkscope pic.twitter.com/z9VqRv1L6Y
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Have questions about other places to see in #Seattle? @VisitSeattle desk right in conf center. #tourkscope pic.twitter.com/MaDbU6piyz
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
RT @VictrolaCoffee: http://t.co/psVBMDKqDU ur welcome to join the public coffee tasting at roastery each Wednesday at 11 AM. #tourkscope
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Pike Place Market. 5 min walk from @SheratonSeattle Lots to see, do, and taste here! #tourkscope pic.twitter.com/kQNloXT6dr
— Martin Giffy D'Souza (@martindsouza) January 31, 2014
Monday, June 16, 2014
Presenting at ODTUG Kscope 14
I will be giving the following presentations on APEX and PL/SQL / at these events this year.
Lunch with Oracle ACEs
When: Mon Jun 23, 2014, 11:15 - 1:00 pm
It’s your chance to meet the ACE Directors and ACEs up close and personal. They will be sitting at tables designated with topics of their expertise. Feel free to join one of those tables for lunch to ask technical questions or just to meet and talk with these Oracle user legends.
Just for the record, I didn't come up with description ;-). Essentially most of the ACEs (ACE Directors, ACEs, and ACE Associates) will be sitting at different tables in the lunch area and you can sit at their table. If you have questions for a specific person bring them and ask them. If you read this blog then you know I'm good for any APEX, PL/SQL, SQL, and Web questions in general. Of course I'm always open to talk about anything else!
Just Log It.
When: Mon Jun 23, 2014, Session 2, 1:15 pm - 2:15 pm
Room: 607
Abstract: Code instrumentation is critical in helping developers debug applications. This presentation will cover Logger, which is an open-source PL/SQL logging tool used in many organizations. The latest features of Logger will be discussed, along with integration into APEX and how to take proactive approaches to error handling in your applications.
This talk will cover the open source PL/SQL logging tool: Logger. I'll also be covering some of the new features that are being actively worked on.
APEX & HTML5
Note: this was supposed to be a talk on APEX 5.0 and had to be changed due to some scheduling conflicts. If you were hoping to see the APEX 5.0 talk I encourage you to go to Dietmar Aust's presentation on Tues at 2:00 pm in room 303.
When: Tues Jun 24, 2014, Session 7, 11:15 am - 12:15 pm
Room: 612
Abstract: This presentation will cover some of the new HTML 5 features and how to integrate them in APEX. HTML 5 is the next major version for HTML. It consists of many new features, which will make developer's jobs a lot easier and improve end-user experience. This presentation will highlight some of these new features and demonstrate how to leverage them within an APEX application. New features include (but not limited to) drag & drop, media, storage, and graphics.
I have given several HTML 5 talks at Kscope before and they have all covered new features. This is no different as it will cover some really cool new features in HTML and show how you can add them to your APEX applications.
Oracle APEX Lunch and Learn (sponsored by OTN)
When: Tues Jun 24, 2014, 12:15-1:45pm
Room 619/620
Time to bring your Oracle APEX questions for this session as it's a free for all Q&A with fellow Oracle ACE Directors Scott Spendolini, Dimitri Gielis, Roel Hartman, Peter Raganitsch.
Thursday, June 12, 2014
#Get2Kscope
I tweeted my experience on getting from the Airport directly to the Sheraton hotel. For those going to KScope next weekend I hope you find these instructions helpful.
Baggage carrousel pretty empty at 730am. Only had to wait 10 mins for bags to come #get2kscope #kscope14 pic.twitter.com/00iFdLomMI
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Despite a very quiet baggage claim area always nice 2 have the #odtug bag tag 2 quickly find my suitcase! #get2kscope pic.twitter.com/3I3PZHpjIo
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Once u get ur bags, head up escalator and follow signs for Light Rail #get2kscope pic.twitter.com/XF21iWDWlI
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Don’t be alarmed if ur walking thru parkade. Just follow the signs! #get2kscope #kscope14 pic.twitter.com/0tvDcLcFY0
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Once you get to train area, you’ll need to get a ticket. Ticket machines look like this #get2kscope pic.twitter.com/fPl1qOjizT
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
And here’s the map. It’s pretty easy. Airport is on the bottom, want to go all the way to top (WestLake) #get2kscope pic.twitter.com/Re0JSZVoou
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
The trip won’t break the bank. $2.75 from airport to hotel. Sounds like a deal to me. #get2kscope pic.twitter.com/cpH1nCohjb
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Don’t have US $? No worries. Tckt machine takes credit cards. #get2kscope Looking forward 2 @rimblas UI feedback ;-) pic.twitter.com/91vlaVQLzm
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Once you finish paying you’ll get a ticket. Don’t lose it! #get2kscope Then head up escalator to platform. pic.twitter.com/DhPJExgkmz
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
If u see one of these ur on the right path! Hop on the train and we’re off to Seattle! #get2kscope pic.twitter.com/Xrty4oOZcy
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Train was pretty empty that early in the morning. Filled up along the way but not jam packed. #get2kscope pic.twitter.com/RH9e8JhBgq
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Sorry, no wifi on the train. Enjoy the scenery. #get2kscope pic.twitter.com/ykf4UxuxVa
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Once u get off at WestLake follow signs for 5th AV & Pine St (map to follow) #get2kscope pic.twitter.com/7SazCD1tgB
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Map with directions from WestLake stn to @SheratonSeattle It’s only a block away! #get2kscope pic.twitter.com/oLA3x4wxpe
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Walk down the street until you see the @SheratonSeattle “S” logo. Couldn’t be easier #get2kscope pic.twitter.com/DVMt6Jq4UI
— Martin Giffy D'Souza (@martindsouza) January 9, 2014
Saturday, April 12, 2014
NTILE vs WIDTH_BUCKET
They're two ways to handle "bucketing data" in Oracle. In the documentation Oracle describes the two types as either having equiwidth or or equiheight histograms.
Equiwidth (NTILE): Each bucket will have the same number of items in it with some buckets having at most 1 more item than other buckets. An easy way to think of this concept is to order all the items, then divide the data evenly into groups based on the number of buckets. For example, supposed you have 9 values (AAAABCDEF) and wanted to put them into 3 buckets. the buckets would be B1 = AAA, B2 = ABC, B3 = DEF. You'll notice that the value "A" is in both buckets B1 and B2.
When an uneven amount of objects need to go into the buckets, NTILE will fill the first bucket first, second bucket second, etc. For example, suppose you had 10 values (AAAABCDEFG) and wanted to fill them into 3 buckets. (Note this is similar to the previous example with an additional "G"). The buckets would be B1 = AAAA, B2 = BCD, B3 = EFG.
with data as ( -- using this as data input select 3 as num_buckets from dual ) select d.dname, e.ename, e.sal, ntile (data.num_buckets) over (order by sal asc) ntile, width_bucket(sal, 0, max(sal+1) over (), data.num_buckets) width_bucket from emp e, dept d, data where e.deptno = d.deptno order by sal; DNAME ENAME SAL NTILE WIDTH_BUCKET -------------- ---------- ---------- ---------- ------------ RESEARCH SMITH 801 1 1 SALES JAMES 950 1 1 RESEARCH ADAMS 1100 1 1 SALES WARD 1250 1 1 SALES MARTIN 1250 1 1 ACCOUNTING MILLER 1300 2 1 SALES TURNER 1500 2 1 SALES ALLEN 1600 2 1 ACCOUNTING CLARK 2450 2 2 RESEARCH JONES 2975 2 2 RESEARCH SCOTT 3000 3 2 RESEARCH FORD 3000 3 2 SALES BLAKE 3850 3 3 ACCOUNTING KING 5000 3 3
Monday, March 31, 2014
Running Custom Code for Tabular Forms (Part 1)
One of my biggest pet peeves with Tabular Forms in APEX is that it would only run basic (Insert, Update, Delete) DML functions against a table. This works really well for basic situations but more often than not data must be processed by a procedure to handle all the business logic. For this reason, I've avoided Tabular Forms for a very long time.
Last week at OGh APEX World, Dimitri Gielis showed how you can run your own procedure against a tabular form. Here's how to do it:
First, create a Tabular Form using the standard wizard. This will create the standard validations and processes for the page. Their will be two Page Processing processes as shown below.
These processes will automatically handle any of the data changes that a user makes in the Tabular Form. For now you can go ahead and remove each process as we'll use a custom procedure to process the data instead.
Next, create a new process. The important part comes when creating the process; be sure to select the Tabular Form option (as shown below).
In your PL/SQL block, you can now reference each of the columns using their column names (example :SAL and :ENAME). What's even better is that APEX will only run the code against rows that have changed which can save a lot of processing time. For example, if only two rows in a 15 row table were changed the code will be executed twice.
In the next article I'll show how to expand this functionality beyond a base table and use this new technique to modify any data set.
Sunday, March 16, 2014
oracleapex.com (part 2)
Initially I used the blog post to host the list of available shortcuts. This wasn't the best solution but it allowed me to quickly inform everyone of the URLs. I have since created an application (built using APEX of course) to list all the redirect shortcuts on oracleapex.com.
Check it out and let me know what you think. Of course if you'd like a specific URL please let me know either by leaving a comment or tweeting me at @martindsouza
Thursday, March 13, 2014
APEX 5.0 and KScope 14
Releasing APEX 5.0 in June would be perfect timing as it coincides with Kscope 14. The conference has a lot of talks specifically focused on APEX 5.0 from both the Oracle development team and some of the worlds leading experts on all things APEX. I think that this conference will be a great opportunity for people (both developers and managers) to learn about all the new features and get hands on experience with this latest version.
One of the unique aspects of Kscope is that you'll be able to easily talk to the Oracle APEX team, Oracle ACE and ACE Directors, and other experts in the community. These are the people that write the blogs, read the books, and do the webinars that you may have read/seen. You can sit down with them and get their advice on how to integrate 5.0 and leverage it to enhance your current applications and increase ROI.
I'll be giving a talk at Kscope 14 called "APEX 5.0 - New Features Highlights". It will cover some of the new aspects of APEX that will help both developers and the business. You can see all the Kscope 14 APEX abstracts here. If you're thinking of coming to the conference you should register soon as Early Bird rates end on March 25th.
Wednesday, March 5, 2014
Referencing USER in APEX
It’s not uncommon to reference the current user as USER in your pl/sql code. A simple use case may be to determine the client or environment that you’re running in (ex: dev, test, prod).
Referencing USER will have some slight side effects when running the code in APEX as the current USER is actually APEX_PUBLIC_USER (or what ever user you configured). This can cause issues in your application. To resolve it, simply reference sys_context('userenv','current_schema’) instead.
Example:
-- Via SQL*Plus select user, sys_context('userenv','current_schema') from dual; USER SYS_CONTEXT('USERENV ---------- -------------------- GIFFY GIFFYIf you run the same query in APEX the output is shown below. You'll notice that referencing USER it does not display my current schema (GIFFY in this case).
The same applies to compiled code executed from APEX. For example if you have a procedure that references USER and that procedure is run from APEX then USER will be APEX_PUBLIC_USER.
This can be really tough to detect in automated tests as when testing via SQL*Plus, USER will return the current schema name.
Tuesday, February 25, 2014
Oracle APEX Training
Monday, February 24, 2014
APEX Shortcuts
The other day I was dabbling around in APEX and noticed a link for Shortcuts in the Shared Components section.
I’ve never used Shortcuts before (let along knew about them) so I tried it out. To start here’s how Shortcuts are described (as copied from APEX screen):
Shortcuts are a repository of shared static or dynamic HTML. Shortcuts are substitution strings that are expanded using the syntax: "SHORTCUT_NAME". Shortcuts are used in the following locations:
- Region Source for regions of type HTML_WITH_SHORTCUTS
- Region Templates, Region Headers & Footers
- Item Labels
- Item Default Value
- Item Post Element Text
- Item Help Text
- HTML Header of a page
Creating shortcuts on page item labels and page item post element text attributes can include the following substitution strings:
#CURRENT_FORM_ELEMENT#
#CURRENT_ITEM_ID#
#CURRENT_ITEM_NAME#
#CURRENT_ITEM_HELP_TEXT#
To reference Shortcuts you need to use the “shortcutname” syntax (quotes included). Since they are wrapped in quotes and could conflict with regular text I strong recommend using a naming scheme such as SC_NAME.
Note: I previously wrote an article about the different ways to reference APEX variables. I have updated it to include Shortcuts. The article is available here.
Shortcuts can either be statically defined or reference a PL/SQL function. It’s important to note that if you do call a PL/SQL function it will execute the code each time the Shortcut is referenced. For example, if you have the same Shortcut in three different regions on a page it’ll call the function three times. This may be a good or bad thing depending on how you use it.
Though I haven’t found an immediate need for Shortcuts I think there could be some situations where it can come in handy for labels and templates especially since it allows you to reference a function which can dynamically generate content.
Saturday, February 8, 2014
APEX Theme Competition
Wednesday, January 15, 2014
Changing Default Item Required Error Message in APEX
This is much quicker then manually creating Not Null validations for each required item as required in older versions of APEX.
If the page is submitted and the item is null, then the page will be reloaded with a validation error message stating that "" The default message can me changed by doing the following:
- Go to Shared Components > Text Messages (under Globalization)
- Create Text Message
- Name: APEX.PAGE_ITEM_IS_REQUIRED
- Text: #LABEL# can not be null
- Use what ever message you'd like to see.
- Note that the substitution string #LABEL# is used for the item's label.
Monday, January 13, 2014
Stopping Dynamic Actions using apex.da.cancelEvent
They're a few times when you may need to stop a Dynamic Action part way through the executing all its actions. Since individual actions don't have conditions associated with them there's no supported way to do this. Thankfully there's an undocumented JavaScript (JS) function called apex.da.cancelEvent. Here's an example of how to use it:
Suppose you have a page with two items, P1_X and P1_Y, and a button on P1. When the user clicks the button the Dynamic Action (DA) needs to set P1_X = X and P1_Y = Y. The DA setup will look like the following:
Note: You'll notice that I used the additional call() function when calling apex.da.cancelEvent in the action. Calling it defines the value of this in the function call as it is required in the cancelEvent function. For more information please read the JS call() documentation.
Wednesday, January 8, 2014
Parsing Imperfect JSON
//Using native JS: JSON.parse //Similar result for jQuery $.parseJSON var jsonStr = '{ename : "martin", sal: 100}'; var jsonObj = JSON.parse(jsonStr); //Raises error: SyntaxError: JSON.parse: expected property name or '}' //Correct JSON object (notice attribute names are quoted) var jsonStr = '{"ename" : "martin", "sal": 100}'; var jsonObj = JSON.parse(jsonStr); console.log (jsonObj); //Returns JSON object Object { ename="martin", sal=100}
var jsonStr = '{ename : "martin", sal: 100}'; eval('jsonObj = ' + jsonStr + ';'); console.log(jsonObj); //Returns JSON object Object { ename="martin", sal=100}
Monday, January 6, 2014
Derived Columns in APEX Standard Reports
Derived columns are place holders for an additional column in the report. The column can reference any of the query's columns but has some limitations such as not declaratively supporting links or being about to compute a value. It's most useful when you need an additional column to be displayed in a specific HTML format.
In the past when I wanted an additional column for display purposes I would just add it in the query as "..., null my_additional_column ... " and then modify the column's HTML Expression value. Now I can just a derived column and modify its HTML Expression.
To add a derived column, go to the Report Attributes then click Add Derived Column on the right hand side as shown below:
Thursday, January 2, 2014
2014 Speaking Engagements
Kickoff to Kscope - Oracle ACE Directors Panel
Seattle, Washington
Jan 9th 4-6pm - Sheraton Seattle Hotel - Jefferson Room
Bring your Oracle questions (in pretty much any category) and discuss them with myself and fellow panelists (and ACE Directors) Kellyn Pot'Vin, Tim Gorman, Tim Tow, and Cameron Lackpour. This session will be moderated by ODTUG president Monty Latiolais.
Following the panel there will be a Happy Hour networking event. Both the panel and happy our are free!
Oregon and Southern Washington Oracle User Group (OSWOUG)
Title: APEX and HTML 5
Seattle, Washington
Feb 19th 4:30pm - Oracle Office (411 108th Ave NE #900, Bellevue, WA, 98004)
As the title suggests, I'll be talking about some really cool HTML 5 features and how to integrate them in your APEX applications. Of course I'll stick around after to answer any of questions.
Note: The OSWOUG website will be updated soon with my complete abstract.
OGh APEX World
Title: TBC (waiting for final abstracts to be accepted)
Zeist, Netherlands
March 25th (exact location TBC)
This will be my first talk in Europe! The speaker list is already very impressive with several ACE Directors and people from the APEX development team.
I'm not able to comment on the talk that I'll be giving yet as I sent in several abstracts to the content committee and will find out which one is selected soon. Once it's finalized I'll update this post with the exact details.
The above link is to the Call for Papers site which is still open until January 10th. If you're in Europe and interested in presenting at APEX World, it's still not too late.
I also hope to go speed skating there as the Netherlands is a mecca for long track speed skating. Trying to talk Roel Hartman into a race jj ;-)
Calgary Oracle User Group (COUG)
Title: Instrumenting your PL/SQL and APEX Applications
Calgary, Alberta
April 17 8:30am - Suncor Energy Centre (West Tower). 150 6th Avenue SW. 17th floor – Room 17L
This talk will cover Logger, an open source logging tool that I've been actively working on, and how to integrate it with APEX. I'll be covering a lot of PL/SQL integration so if you're not an active APEX developer it'll still be relevant.
ODTUG Kscope 14
Title: Just Log It.
Title: APEX 5 (TBC)
Seattle, Washington
June 22-26 - Sheraton Seattle Hotel
It goes without saying the Kscope 14 is the premier Oracle and APEX conference to attend. Besides having excellent content there's a lot of great opportunities to network and meet the experts from around the world. If you've read an Oracle book before, odds are the author(s) will be at Kscope. Best part is everyone is very friendly and approachable.
I'll be giving two presentations. The first is on Logger, an open source logging tool that I've been actively working on, and how to integrate it with APEX. The other presentation will be on APEX 5. Seeing as it's not out yet I don't have a specific topic but I'll make sure it's interesting.
That covers the first half of 2014. I'm really looking forward to all the events and most importantly seeing and meeting everyone!
- Martin