Presentation on theme: "Pennsylvania Banner Users Group APEX Day at Immaculata APEX 101."— Presentation transcript:
Pennsylvania Banner Users Group APEX Day at Immaculata APEX 101
Lehigh Carbon Community College (LCCC) Developer: Wayne Youngblood email@example.com DBA: Don Thaler firstname.lastname@example.org Over 40 APEX applications used in Production at LCCC
What is APEX Oracles Application Express (formerly called HTMLDB) A hosted declarative development environment for developing and deploying database-centric Web applications. Users work in a dedicated work area called a workspace. A workspace is a virtual private database that enables multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private.
LCCCs APEX Setup APEX engine is installed in LCCCs Banner instances The Application Server is Windows Server 2003 Entries in the Application Servers marvel.conf file determine what URL points to what Banner Database instance (mod_plsql cartridge) Examples: 1. Entries within this tag are for LCCCs production Banner instance. The URL to the Production APEX development environment is http://banforms:7778/pls/htmldb/f?p=4550:8 2. Entries within this tag are for LCCCs pre-production Banner instance. The URL to the Pre- Production APEX development environment is http://banforms:7778/pls/pprd/f?p=4550:8
The APEX Development Environment Application Builder (the focus of today) SQL Workshop Utilities
Application Builder Lists all of the applications residing in the Workspace you are logged on to.
Application Builder Can display icons (previous slide) or details (below)
Application Builder When clicking into an application, the pages of the application are available to edit New pages can be created Additional icons appear at the top of the screen for 1. Running the application (to test any functionality) 2. Supporting Objects (not in todays scope) 3. Shared Components 4. Export/Import
A closer look at the select query (in previous slide) select distinct substr(SOBTERM_TERM_CODE,1,4) || ' ' || decode(substr(SOBTERM_TERM_CODE,5,2), '10', 'Spring', '20', 'Summer', '40', 'Fall', '15', 'Spring', '45', 'Fall') || ' ' || decode(substr(SOBTERM_TERM_CODE,6), '0', 'Credit ','Non Credit ') d, SOBTERM_TERM_CODE r from sobterm where sobterm_term_code >= (select max(sobterm_term_code) - 200 from sobterm) order by 2 desc
Editing a page Items Add Label. Default is the item name without the P1_ prefix.
Editing a page Items Enter the Source. This was done in the previous step with the query. No Action needed.
Editing a page Items Derive Item Source. Leave the default.
Editing a page Items The new item now appears in the Item section of page rendering.
Select list with submit warning When you use a select list with submit (or any other item with submit), you need to create an unconditional branch to return to the current page or you will see this error message when selecting from the list:
Unconditional Branch Create the unconditional branch in the Branches section under Page Processing
Unconditional Branch Use the Branch Point default and select the Branch to Page Branch Point
Unconditional Branch Select the page to branch to. In this case there is only page 1. Select the include process success message.
Unconditional Branch There are no conditions, so click the Create Branch button.
Unconditional Branch The new branch will be listed under the Branches section of Page Processing.
Editing a page Buttons Create a button in the Item Hold Region.
Editing a page Buttons Keep default of Create button in region position.
Editing a page Buttons Give the button a name and Label. Leave default action to submit the page.
Editing a page Buttons Keep the button template default
Editing a page Buttons Select the region position and the alignment for the button.
Editing a page Buttons Enter page to branch to when button is pressed. In this case we branch back to the current (and only) page in the application.
Editing a page Buttons Select when or if you want the button displayed. In this case we have no conditions, so we just click the Create Button button.
Editing a page Buttons The new button now appears in the Button section of Page Rendering. Additionally, a new branch appears in the Branches section of Page Processing.
Create a Process Use the default PL/SQL process
Create a Process Name the process (spaces in name okay) and keep the default Process Point, On Submit.
Create a Process Enter the PL/SQL. In PL/SQL any page item must be referenced like a bind variable (with the colon). You can also use anonymous blocks. This example is simply setting the P1_TERM item to null.
Create a Process Enter Success or Failure messages. In more complex processes you would capture SQLERRM and display here in a hidden page item (e.g. P1_MSG). This is a simple process that does not access Banner, so leave blank.
Create a Process Choose the CLEAR button from the When button Pressed list. Any button you create on a page will appear in this list. Click the Create Process button.
Create a Process The new process now appears in the Processes section of Page Processing.
Running the Application in the Development environment When you run the application in the development environment, the bottom of the screen allows you to go back to editing the Application or individual page you are working on. Edit links and debug are also available.
Creating as SQL report Create a new Region. This is a Report Region.
Creating an SQL report Enter a title for the report. Select your desired display point (leaving the default in this example).
Creating an SQL report Enter SQL for the report.
Creating an SQL report Closer look at the report SQL: select SSBSECT_SUBJ_CODE, SSBSECT_CRSE_NUMB, SSBSECT_SEQ_NUMB, SSBSECT_CREDIT_HRS, SSRMEET_DAYS_CODE, SSRMEET_BEGIN_TIME, SSRMEET_END_TIME, SSRMEET_BLDG_CODE, SSRMEET_ROOM_CODE from ssbsect, ssrmeet where SSBSECT_TERM_CODE = :P1_TERM and SSBSECT_TERM_CODE = SSRMEET_TERM_CODE and SSBSECT_CRN = SSRMEET_CRN
Creating an SQL report Choose the look of the report (default used here).
Creating an SQL report Put a condition on the report. In this case we are using a PL/SQL expression the :P1_TERM is not null.
Creating an SQL report The report now appears in the Regions section under Page Rendering.
Displaying the report You can modify the report attributes to give columns more meaningful names than the Banner table names.
Displaying the report By the report Title (Courses) is a link Report. When you click on that link you are in the Report Attributes area.
Displaying the report Choose Custom radio button for Headings Type and you can change the headings.
Displaying the report The changed headings. You can use HTML tag in the headings.
Displaying the report The report after changing the headings.
Exporting To export an application, click the Export/Import icon at the application level and follow the prompts.
Exporting After clicking the Export Application button, the File Download dialog appears. Note the file name F121.sql. 121 is the applications unique ID in this database instance.
Exporting Save the file to whatever directory you keep your applications, preferably a server that gets backed up.
Importing Log into the instance you want the users to access the application (if it is a different instance). Go to application builder and Click the Import button.
Importing Use the Browse button to find your application.
Importing Use the Browse button to find your application.
Importing Click Next until you see this screen. Select the parsing schema and Reuse Application ID and click the Install button.
Importing After the application is installed you can click the Run Application icon and copy the URL for your users.
Importing After the application is installed you can click the Run Application icon and copy the URL for your users. You only need to copy up to the f?p=121:1 That is the application id and page. The rest is the current session id.
Importing When the user enters http://banforms:7778/pls/htmldb/f?p=121:1 they will get the application only, not the APEX development environment.http://banforms:7778/pls/htmldb/f?p=121:1
Some LCCC Applications Pennsylvania Secure ID Reports students who have PA assigned Secure IDs (GORADID). Extracts students from Banner who need IDs assigned. Creates csv file in the states required format. Updates GORADID table when state assigns IDs. Application uploads the csv file, then updates GORADID.
Some LCCC Applications Course Date Change Change start and end dates for part of terms. Can move CRNs to different part of terms. Change dates for non-credit courses.
Some LCCC Applications Student Email Lookup Allows the help desk or student services to fix student email issues. Show last accessed. Allows manual creation of email accounts in case that is needed.
Some LCCC Applications Population Selection Allows users the ability to paste Student IDs from various spreadsheets and create a mass entry into GLBEXTR. Non-Credit Course Lookup A tool for the website manager to quickly check Banner if non-credit courses are missing from the website. Tools like this are handy for people that do not use Banner.
Some LCCC Applications Send Student Email Application lets the user paste student IDs from a spreadsheet to obtain email addresses. Choose who the from will be (registrar, bursar, marketing, etc.) Compose and send email. All email addresses put in blind copy. Send out in batches when blind copy gets close to 4000 characters.