Manage Customers Profile using Interactive Grid and Input Form - Part 5

Tech Mining
19 Sept 202241:08

Summary

TLDRThis Tech mining video tutorial guides viewers on creating a customer management setup using Oracle Apex. It covers creating interactive grid and form pages for browsing, searching, adding, and removing customer profiles from a database. The tutorial demonstrates using wizards, configuring properties, and implementing features like breadcrumbs, modal dialogs, and validations to ensure data integrity. Viewers learn to enhance user experience with dynamic actions and input masks, culminating in a functional customer profile management system.

Takeaways

  • 😀 The video demonstrates how to create a customer profile management setup using Oracle Apex.
  • 🔍 It covers the creation of two pages, one for viewing and editing customer information and another for adding or removing customer records.
  • 📊 The first page is an interactive grid displaying all customers from a database, with each customer's name as a clickable link.
  • 📝 The second page is a form for inputting details of a new customer, modifying an existing customer's profile, or deleting a customer from the database.
  • 🛠️ Oracle Apex's built-in wizards are used to facilitate the creation and configuration of these pages.
  • 🔑 The primary key for customer records is set to 'Customer ID Number', and a sequence is used for auto-generating primary key values.
  • 🎯 The interactive grid allows for data manipulation, including sorting, filtering, and direct cell editing, providing a more dynamic user experience than traditional reports.
  • 📝 The form page supports functionalities like computations, validations, processes, and branches, enhancing data integrity and user interaction.
  • 🌐 Breadcrumbs are used for hierarchical navigation, allowing users to understand their position within the application and navigate back easily.
  • 🚫 Validations are created to prevent actions such as deleting customers with existing orders or setting a credit limit above the predefined cap.
  • 🔄 A dynamic action is used to refresh the interactive grid immediately when the form page closes, ensuring the data displayed is always current.

Q & A

  • What is the main purpose of the video?

    -The video demonstrates how to create a setup for managing customer profiles, including browsing, searching, modifying, adding, and removing customer records using Oracle Apex.

  • What are the two pages created in the video?

    -The two pages created are an interactive grid page for viewing and searching customer records (page 2) and a form page for adding, modifying, and deleting customer details (page 7).

  • What is the difference between an interactive grid and an interactive report in Oracle Apex?

    -An interactive grid is similar to an interactive report but offers additional features such as cell editing, fixed headers, frozen columns, scroll pagination, multiple filters, sorting, aggregates, and computations.

  • What is the purpose of a modal dialog page in Oracle Apex?

    -A modal dialog page is a standalone page that appears on top of its calling page, preventing users from interacting with the underlying page until it is closed.

  • How does the breadcrumb navigation feature work in the application?

    -Breadcrumbs provide a hierarchical list of links indicating the user's location within the application, allowing users to quickly navigate back to any level of the hierarchy.

  • What is the significance of setting the 'Data Source' attribute to 'Local Database'?

    -Setting the 'Data Source' attribute to 'Local Database' specifies that the interactive grid will populate its data from a database table, enabling the display of customer records.

  • Why is the 'Customer ID' column set to 'Hidden' in the interactive grid?

    -The 'Customer ID' column is set to 'Hidden' because it is a primary key column used for data integrity in the database and does not need to be displayed in the application interface.

  • How does the video guide users to modify the SQL query for the interactive grid?

    -The video instructs users to replace the auto-generated SQL statement with a custom one that concatenates the first and last names of customers and combines the two address columns into a single address column.

  • What is the role of the 'Dynamic Action' created on page 2?

    -The Dynamic Action on page 2 is responsible for refreshing the interactive grid immediately when the form page closes, ensuring that the grid displays the most recent data without requiring a browser reload.

  • How does the video address the issue of primary key violation when creating the first customer record?

    -The video suggests that beginners may encounter a primary key violation due to the initial value of the sequence object. It recommends clicking the create button multiple times or adjusting the sequence object's start value to resolve the issue.

  • What validations are created in the video to ensure data integrity?

    -Two validations are created: one to check that the customer's credit limit does not exceed a set cap of five thousand dollars, and another to prevent the deletion of customer records with existing orders.

Outlines

00:00

😀 Welcome and Overview of Customer Profile Management

This paragraph introduces the video, welcoming viewers and outlining the setup for managing customer profiles. It details the features of browsing, searching, modifying, adding, and removing customer records using Oracle Apex. It also describes the interactive grid and form pages for viewing and editing customer information, created using the Oracle Apex wizard.

05:02

😀 Creating Pages with Oracle Apex Wizard

This paragraph explains the creation of two application pages using the Oracle Apex wizard. The first page displays all customer data in an interactive grid, while the second page is a modal dialog form for adding, modifying, and deleting customer records. The wizard screens and their functionalities are described in detail.

10:04

😀 Setting Up Interactive Grid and Columns

This paragraph describes the setup of the interactive grid page. It includes instructions for setting properties, hiding columns, and saving and running the page to view the interactive grid displaying customer data. It also covers transforming customer name columns into links and setting up link properties.

15:13

😀 Configuring Create Customer Button and Form Page

This paragraph details the customization of the create customer button and form page. It explains modifying button properties, configuring form page items for better visual appearance, and ensuring mandatory fields are marked in red. The paragraph also describes saving progress and testing the form page.

20:26

😀 Adjusting Form Item Properties and Validations

This paragraph focuses on modifying form item properties, setting placeholders, and creating validations. It explains setting properties for optional items, adding placeholders for phone numbers, and creating validations for customer credit limits and preventing deletion of customers with existing orders.

25:31

😀 Changing Item Types and Attaching LOVs

This paragraph covers altering item types and attaching List of Values (LOVs). It describes changing the state item from text field to select list and attaching the state LOV created in a previous video. Additional properties like display null value and extra values are also explained.

30:33

😀 Creating and Configuring Validations

This paragraph elaborates on creating and configuring validations for form items. It includes steps for creating a validation for customer credit limits and preventing deletion of customers with orders. The paragraph also covers modifying wizard-generated dynamic actions for page refreshes.

35:36

😀 Using Search Bar and Actions Menu

This paragraph explains the usage of the search bar and actions menu in the interactive grid. It details searching for customer records, removing filters, resetting the grid, and exploring additional options in the actions menu. The paragraph also describes creating and modifying customer records using the form page.

40:37

😀 Summary of Learned Concepts

This paragraph summarizes the key concepts covered in the video. It includes creating report and form pages, modifying form input items, applying input masks, creating validations, and using dynamic actions. The video concludes with a thank you note to the viewers.

Mindmap

Keywords

💡Tech mining

Tech mining refers to the process of extracting and analyzing data from technological sources, which in this video context, involves creating a setup for managing customer profiles within a database. It is a central theme of the video, as the tutorial demonstrates how to use Oracle Apex to mine and manage customer data effectively.

💡Customer Profiles

Customer profiles are detailed records containing information about individual customers. In the video, the focus is on creating a system to manage these profiles, allowing for browsing, searching, modifying, and deleting customer records, which is essential for customer relationship management and database administration.

💡Oracle Apex

Oracle Apex is a low-code development platform that enables the rapid development of scalable, secure enterprise apps. The video script discusses using Oracle Apex's features and wizards to create pages for managing customer data, highlighting its utility in declarative development for database interactions.

💡Interactive Grid

An interactive grid is a feature in Oracle Apex that allows for the display and manipulation of data in a tabular format. The script describes how to create an interactive grid to display all customers from a database, emphasizing its capabilities such as editing cell values, fixed headers, and sorting — crucial for data management.

💡SQL Select Query

A SQL select query is used to retrieve data from a database. In the video, a SQL select query is utilized to populate the interactive grid with a list of all customers, demonstrating the fundamental role of SQL in interacting with database systems.

💡Form Page

A form page in the context of the video is a user interface for inputting and modifying data. The script explains creating a form page that allows users to add new customer records, modify existing ones, and delete customers from the database, showcasing the page's role in data management workflows.

💡Modal Dialog Page

A modal dialog page is a type of user interface element that requires users to interact with it before they can return to the main application. The script mentions page 7 as a modal dialog page, used for detailed customer data input, emphasizing its role in focused interactions within the application.

💡Breadcrumb Navigation

Breadcrumb navigation provides a trail for users to see their path within an application, allowing them to navigate back to previous levels. The script describes using breadcrumbs for hierarchical navigation, indicating the importance of user-friendly navigation in application design.

💡Primary Key

A primary key is a unique identifier for a record in a database table. The script explains setting the 'customer ID number' as the primary key, which is essential for uniquely identifying customer records and performing database operations like insert, update, and delete.

💡Dynamic Action

Dynamic actions in Oracle Apex are used to perform tasks in response to user interactions without requiring a page refresh. The script describes a dynamic action that refreshes the interactive grid when the form page closes, illustrating the concept of enhancing user experience with immediate feedback.

💡Validation

Validation in the context of form data refers to ensuring that the input meets certain criteria before it is accepted or processed. The script discusses creating validations to prevent actions like deleting customers with existing orders or exceeding credit limits, highlighting the importance of data integrity and user guidance.

Highlights

Introduction of a setup to manage customer profiles with capabilities to browse, search, modify, and delete customer records.

Utilization of Oracle Apex wizard to create two pages for viewing and editing customer information.

Demonstration of an interactive grid on page two displaying a list of all customers using a SQL select query.

Explanation of how customer names in the interactive grid act as links to a detailed form page.

Introduction of page seven as an input form for adding new customers, modifying existing ones, and deleting records.

Overview of declarative development features offered by Oracle Apex for creating pages manually.

Description of the interactive grid's advanced functionalities compared to the interactive report.

Guidance on setting properties for the interactive grid page, including unique identification and page mode.

Explanation of modal dialog pages and their standalone nature in Oracle Apex applications.

Process of selecting a data source for the interactive grid from a local database table.

Use of breadcrumbs for hierarchical navigation within the application.

Instructions on setting up a primary key for database operations and the use of sequences for primary key values.

Customization of the interactive grid's appearance and behavior through column properties.

Transformation of the customer name column into a link to facilitate easy access to detailed profiles.

Modification of form page properties for better visual representation and user interaction.

Introduction of list of values (LOV) for selecting predefined options, such as states.

Application of input masks to standardize user input for phone numbers.

Implementation of validations to ensure data integrity, such as credit limit checks and preventing deletion of records with existing orders.

Use of dynamic actions to automatically refresh pages, enhancing user experience and data consistency.

Summary of the video's educational content, including the creation of report and form pages, modification of form items, and application of validations and dynamic actions.

Transcripts

play00:00

a very warm welcome to Tech mining

play00:07

in this video you will create a setup to

play00:10

manage customers profiles that will

play00:12

allow you to browse and search customer

play00:14

records modify customers profiles add

play00:17

record of a new customer to the database

play00:19

and remove a customer from the database

play00:22

this setup is based on the demo

play00:24

customers table which was created in

play00:27

part 2 video

play00:28

in this video you will create two pages

play00:31

with the help of Oracle Apex wizard to

play00:33

view and edit customers information

play00:36

this first figure is of page two of our

play00:38

sales web application which is an

play00:40

interactive grid and displays a list of

play00:43

all customers from the database table

play00:44

using a SQL select query

play00:47

each customer's name appears as a link

play00:49

in the interactive grid

play00:51

when you click the name of a customer

play00:53

this form page appears with complete

play00:55

profile of the selected customer

play00:58

this second figure is of page 7 which is

play01:00

an input form to receive details of a

play01:03

new customer modify the record of an

play01:05

existing customer and delete customer

play01:07

from the database

play01:09

let's get our hands dirty with some

play01:11

practical work to learn more exciting

play01:13

declarative development features offered

play01:15

by Oracle Apex

play01:17

the home page of our application was

play01:19

created by the app builder wizard at the

play01:21

time when the application was created

play01:23

the rest of the pages in this

play01:25

application will be created manually

play01:27

with the help of wizards and copy

play01:28

utility

play01:30

these following steps shows you through

play01:32

to create the two pages via a built-in

play01:34

wizard

play01:35

you will use this create button

play01:37

throughout this video series to create

play01:39

new application pages

play01:41

on this first wizard screen click

play01:44

interactive grid

play01:45

this wizard screen allows you to select

play01:47

a single option from a collection of

play01:49

multiple choices

play01:51

this screen presents subcategories of

play01:53

reports and requires a single selection

play01:55

the report will base on the option you

play01:58

selected here means an interactive grid

play02:00

will act as a report to display all

play02:02

customers from the database

play02:04

to version 5.0 Apex used the interactive

play02:08

report feature to present data in a

play02:10

tabular form

play02:12

since version 5.1 you are provided with

play02:15

a new feature called an interactive grid

play02:17

which is similar to the interactive

play02:19

report but it allows you to manipulate

play02:21

data simply by clicking on a cell and

play02:23

editing its value

play02:25

it also introduces fixed headers Frozen

play02:28

columns scroll pagination multiple

play02:31

filters sorting Aggregates and

play02:34

computations

play02:36

it is designed to support all item types

play02:38

and item type plugins

play02:40

these all functionalities is the major

play02:42

difference between the interactive grid

play02:44

and interactive report

play02:46

[Music]

play02:48

set the properties for the interactive

play02:51

grid page

play02:52

an application Express each page is

play02:55

identified with a unique number

play02:57

interactive grid page will be recognized

play02:59

by number two

play03:01

just like numbers a page is provided

play03:03

with a unique name for visual

play03:05

recognition

play03:06

you can recognize a page by its name in

play03:09

the app builder interface

play03:11

the page mode property specifies how you

play03:13

want to see a page it has two options

play03:16

normal and modal dialog

play03:19

new pages created in Oracle Apex default

play03:21

to normal

play03:23

in our application page 2 is a normal

play03:25

page

play03:27

7 on the other hand is a modal dialog

play03:29

page a modal dialog page is a standalone

play03:33

page which appears on top of its calling

play03:36

page and doesn't allow users to do

play03:38

anything else unless it is closed

play03:40

a modal dialog page can be displayed

play03:43

only on top of another page

play03:46

[Music]

play03:50

include form page

play03:52

this page will carry a form to add

play03:54

modify and delete customers and will be

play03:57

called from page 2 customers

play03:59

this page is a modal dialog page which

play04:02

supports all the functionality of a

play04:04

normal page including computations

play04:06

validations processes and branches

play04:09

[Music]

play04:16

the form page will have number seven

play04:19

[Music]

play04:30

in the data source attribute select

play04:33

local database in Source type we

play04:35

specified to use a database table data

play04:38

to populate this interactive grid

play04:40

next you selected the default value

play04:42

appearing in table view owner attribute

play04:45

this is usually the database schema to

play04:47

which you are connected once you select

play04:50

a schema all tables within that schema

play04:52

are populated in the table view name

play04:54

drop-down list from where you select a

play04:57

table demo customers in the current

play04:59

scenario whose data will be displayed in

play05:01

the interactive grid

play05:03

[Music]

play05:06

expand the navigation wizard screen

play05:09

[Music]

play05:13

a breadcrumb is a hierarchical list of

play05:16

links

play05:17

it indicates where the user is within

play05:19

the application from a hierarchical

play05:21

perspective

play05:22

users can click a specific breadcrumb

play05:24

link to instantly switch back to any

play05:26

level

play05:27

we use breadcrumbs as a second level of

play05:29

navigation at the top of each page a

play05:32

breadcrumb shared component was created

play05:34

by the app builder when you created this

play05:36

application earlier

play05:38

for the breadcrumb parent entry for this

play05:40

page select the home menu entry to

play05:43

create a hierarchy in this application

play05:47

foreign

play05:51

foreign

play05:53

[Music]

play05:55

navigation preference map to an existing

play05:58

navigation menu entry for this page set

play06:01

existing navigation menu entry to setup

play06:04

this step will make the setup entry

play06:06

active in the main navigation menu when

play06:08

this page is accessed

play06:10

click next

play06:11

[Music]

play06:16

on this primary key page

play06:19

set the first primary key column

play06:21

attribute to customer ID number

play06:24

in this step you specified the primary

play06:27

key column

play06:28

a primary key is a column or set of

play06:30

columns that uniquely identify a record

play06:32

in a table

play06:34

forms perform insert update and delete

play06:36

operations on table rows in the database

play06:39

a sequence is a database object that

play06:42

automatically generates primary key

play06:44

values for every new customer record

play06:46

leave the second primary key column to

play06:49

default

play06:50

click the create button to finish the

play06:52

pages creation process

play06:59

both pages are created and their

play07:01

structures are presented in the page

play07:02

designer

play07:03

[Music]

play07:09

during these Pages creation when you

play07:11

choose demo customers table from tables

play07:14

view name select list all the columns

play07:16

from that table were selected

play07:18

to hide the rest of the columns from

play07:20

that table at runtime

play07:22

expand the columns node under customers

play07:25

region

play07:26

set the type property to Hidden these

play07:29

columns will not display at runtime

play07:32

foreign

play07:38

[Music]

play08:05

foreign hit the save and run page button

play08:08

to take a look at Pages we've just

play08:10

created

play08:12

[Music]

play08:15

this is page 2 of our application which

play08:17

contains an interactive Grid in which

play08:20

you can view all customers data

play08:23

these are displayed columns for which we

play08:25

have not set the hidden property in

play08:27

previous step you can also access the

play08:30

page too from this main menu under this

play08:33

setup entry

play08:34

[Music]

play08:43

this is the form page page 7 of our

play08:46

sales web application which connects to

play08:48

the local database and fetches data from

play08:50

demo customers table into relevant page

play08:53

items listed under the page items node

play08:55

in page designer the same page items are

play08:59

used to receive user input when a new

play09:01

customer record is created

play09:04

clicking the create button will also

play09:06

open form page 7 but this time it

play09:09

appears without any existing data

play09:12

[Music]

play09:32

under the source section select SQL

play09:35

query to see the default query generated

play09:37

for the interactive grid

play09:39

foreign

play09:43

[Music]

play09:49

is provided in video description

play09:52

download it open part 5 folder to get

play09:55

all files used in video

play09:58

[Music]

play10:03

this SQL statement in SQL query text

play10:06

area by replacing the existing query

play10:09

here the auto-generated select SQL

play10:12

statement is replaced with a custom

play10:14

statement that uses the concatenation

play10:16

operator to join columns

play10:19

the new statement joins last and first

play10:21

names of customers into a single column

play10:24

the new concatenated column is

play10:27

recognized by customer name

play10:29

similarly the two address columns are

play10:31

combined to form a single address

play10:34

[Music]

play10:37

expand the columns node under customers

play10:40

region

play10:41

click customer name column

play10:45

[Music]

play10:47

change its heading foreign

play10:55

[Music]

play11:00

the headings of other columns for better

play11:02

visual look

play11:03

[Music]

play11:31

thank you

play11:35

click the customer ID column make sure

play11:38

that its type property is set to Hidden

play11:40

column

play11:41

this action will hide the column at

play11:43

runtime

play11:44

primary key columns are added to

play11:46

database tables to enforce data

play11:48

integrity and are not displayed in

play11:50

applications

play11:51

this is why such columns type property

play11:54

is set to Hidden to make them invisible

play11:57

at runtime

play11:58

hit the save and run page button

play12:04

note these columns headings are changed

play12:07

click the actions menu

play12:09

from the action menus list select

play12:12

columns

play12:13

in the columns window make sure all the

play12:16

columns are selected that is they all

play12:18

have a check mark if you remove a check

play12:21

mark from a column it disappears from

play12:23

the interactive grid report

play12:26

[Music]

play12:28

using this Arrow icon arrange these

play12:31

displayed columns in this order

play12:40

click the save button in the columns

play12:42

window to apply the changes

play12:45

[Music]

play12:49

click the actions menu again select

play12:52

report option click save option

play12:55

after you modify an interactive grid

play12:57

save it using this option otherwise you

play13:00

will lose the applied settings when you

play13:02

access it later

play13:03

thank you

play13:07

click page 2 in the developers toolbar

play13:09

at the bottom of your screen to access

play13:12

the page designer

play13:13

click the customer name column to set

play13:15

the properties

play13:17

[Music]

play13:23

in these properties you are transforming

play13:26

the customer name column into a link

play13:29

that will lead to page 7.

play13:31

scroll down to the link section

play13:35

click no link defined under Target to

play13:38

bring up the link Builder dialog box in

play13:41

the link Builder dialog box set the link

play13:44

properties

play13:45

foreign

play13:47

[Music]

play13:56

use this lovs in the set items section

play13:59

to select the item name and the value

play14:01

[Music]

play14:08

when you click a customer's name in the

play14:10

interactive grid report at runtime the

play14:13

ID of that customer is stored in this

play14:15

substitution string

play14:17

then it is forwarded to this

play14:18

corresponding page item p7 customer ID

play14:22

on page 7 which displays the profile of

play14:25

the selected customer using this ID

play14:27

[Music]

play14:29

clear cache property blanks all the

play14:32

items on page 7.

play14:34

[Music]

play14:38

properties close the link Builder dialog

play14:40

box using the OK button

play14:43

[Music]

play14:51

save and run the page

play14:53

the customer name column will now appear

play14:55

as a link

play14:57

click any customer name to see the

play14:59

details on page 7 which pops up on top

play15:02

of page 2.

play15:03

[Music]

play15:13

after transforming the customer name

play15:15

column into a link hide this pencil edit

play15:17

icon at runtime

play15:20

[Music]

play15:22

mark this column as hidden

play15:26

foreign

play15:30

[Music]

play15:48

click the customer's interactive grid

play15:50

region

play15:52

[Music]

play15:55

make sure its template property is set

play15:57

to standard

play15:59

the selected template will place a title

play16:01

and a border for the interactive grid

play16:03

region

play16:04

[Music]

play16:08

in previous versions of Apex developers

play16:11

used to create these buttons manually

play16:13

but in this version Apex built-in

play16:15

Wizards facilitated Developers

play16:18

modify the properties of this wizard

play16:20

generated create button

play16:22

[Music]

play16:31

the label of this button is set to

play16:33

create customer

play16:35

[Music]

play16:40

the button is placed in the copy

play16:42

position the position property provides

play16:44

you with over a dozen values

play16:47

the best way to understand the other

play16:49

options is to try each one to see its

play16:51

effect

play16:51

[Music]

play16:53

a hot attribute renders the button in a

play16:55

dark color

play17:00

the remaining properties create a link

play17:02

to call Page 7.

play17:07

the clear cache property blanks all the

play17:09

items on the target page page 7.

play17:13

don't forget to save your progress time

play17:16

to time

play17:19

[Music]

play17:25

this is another way to call the desired

play17:28

page from this search box

play17:31

call form page page seven

play17:37

[Music]

play17:39

click each item under the customer's

play17:42

detail region and modify the properties

play17:45

these properties will provide form page

play17:48

a better visual look at runtime

play17:51

[Music]

play17:56

this property provides a respective

play17:59

sequence for the page items using

play18:01

numbers

play18:02

start new row is set to on through which

play18:05

page items will be placed in a new row

play18:07

at runtime

play18:08

column and column span properties are

play18:11

set to automatic which specifies how

play18:13

many columns a page item should span

play18:19

template property is set to required

play18:21

which specifies that the page item must

play18:24

be filled out before submitting the form

play18:27

[Music]

play18:30

the width property sets page items width

play18:34

on the page

play18:35

some values for the value required

play18:37

property are set to on

play18:39

if value required is set to on and the

play18:42

page item is visible Oracle Apex

play18:45

automatically performs a not null

play18:46

validation when the page is submitted

play18:49

then you are asked to input a value for

play18:51

the field

play18:52

this property Works in conjunction with

play18:55

template required property to signify

play18:57

mandatory column items displaying in red

play19:00

color at runtime

play19:02

save your work

play19:04

[Music]

play19:11

modify the properties for the remaining

play19:14

page items

play19:16

[Music]

play19:27

by turning off this start new row

play19:30

property this current page item will be

play19:32

placed besides its previous page item

play19:34

and will not use a new row

play19:37

if start new row property is off then

play19:39

this new column property is set to on

play19:42

for an item to use a new column

play19:46

[Music]

play19:58

foreign

play20:04

[Music]

play20:25

template property is set to optional

play20:28

which specifies that this page item is

play20:31

not mandatory to be filled out

play20:33

it will also not be marked in red color

play20:36

at runtime

play20:38

[Music]

play20:45

if value-required property is set to off

play20:48

then no validation is performed and a

play20:50

null value is accepted

play20:52

[Music]

play21:05

foreign

play21:09

[Music]

play21:39

foreign

play21:51

by setting this six value this page item

play21:55

will be spent in this given value

play22:00

[Music]

play22:11

foreign

play22:16

[Music]

play22:40

this time empty the width property

play22:42

further this item will be transformed

play22:44

into a select list item

play22:46

[Music]

play22:57

thank you

play23:00

[Music]

play23:15

foreign

play23:20

foreign

play23:23

[Music]

play24:06

thank you

play24:10

[Music]

play24:28

foreign

play24:33

[Music]

play25:01

foreign

play25:03

[Music]

play25:30

foreign

play25:32

[Music]

play26:05

foreign

play26:08

[Music]

play26:19

set the type property from text area to

play26:22

text field

play26:23

[Music]

play26:44

thank you

play26:45

[Music]

play27:10

foreign

play27:13

[Music]

play27:34

refresh the Run page

play27:36

[Music]

play27:42

here's your modified form page page

play27:44

seven these page items displaying in red

play27:47

color are the items for which we have

play27:50

set template property to required to

play27:53

make these items mandatory

play27:55

[Music]

play27:56

foreign

play28:00

[Music]

play28:21

expand the pre-rendering node rename the

play28:24

wizard generated process

play28:27

if you see a different process name then

play28:29

there is nothing to worry about as it

play28:32

sometimes happens due to change in Apex

play28:34

version

play28:35

this process is responsible to

play28:37

initialize form region items

play28:39

the process fetches and displays data in

play28:42

page items when you select a customer by

play28:44

clicking the corresponding edit icon on

play28:47

the reports page and it initializes the

play28:50

page items when you create a new

play28:52

customer record

play28:54

this is the processing tab this process

play28:57

is also generated by built-in wizards of

play28:59

Oracle Apex

play29:01

change the name of this process to

play29:03

process customer data

play29:05

this process is of automatic row

play29:07

processing DML type and performs insert

play29:10

update or delete action on a form region

play29:13

customer details region in the current

play29:15

scenario it's a good practice to save

play29:17

your work after performing each and

play29:20

every step

play29:23

in this step you'll work on the state

play29:25

column

play29:26

first you will alter its type from text

play29:29

field to a select list then you will

play29:32

attach a list of value Lov to this

play29:35

column

play29:36

Oracle Apex allows you to change an

play29:38

item's type from its default state to

play29:40

another desirable type

play29:42

for example this state item was

play29:44

generated as a text type by the wizard

play29:46

now we want to change this item to a

play29:49

select list to hold a predefined States

play29:51

list

play29:52

[Music]

play29:58

to display this list you'll attach the

play30:01

state's Lov to this item

play30:03

the state Lov was created in part 3

play30:05

video of this series

play30:07

[Music]

play30:12

turn off display extra values property

play30:15

an item may have a session State value

play30:18

which does not occur in its list of

play30:20

values definition if you choose not to

play30:23

display this extra session State value

play30:25

and there is no matching value in the

play30:27

list of values definition the first

play30:30

value will be the selected value

play30:32

for instance while creating a new

play30:34

customer record you will see choose a

play30:36

state as the first value in the list

play30:39

turn on display null value property

play30:42

which is the default

play30:44

the display null value property makes it

play30:47

possible for a user to choose a null

play30:49

value instead of one of the list items

play30:52

it also provides additional properties

play30:54

appear on the screen for you to specify

play30:56

the display value for this new entry

play30:58

which is choose state in the current

play31:01

scenario

play31:03

enter choose state in null display value

play31:07

this step along with the previous one

play31:09

generates a placeholder that appears on

play31:12

top of the Lov asking for a selection

play31:15

whenever you call this page to create a

play31:18

new customer record

play31:19

save your work

play31:26

modify the two phone number items

play31:30

[Music]

play31:36

set their value placeholder property

play31:39

under appearance section

play31:41

[Music]

play31:45

when a new customer record is added this

play31:49

placeholder is shown in the two phone

play31:51

number items to receive input in the

play31:53

specified format

play31:55

as you type in values the placeholders

play31:58

will be replaced by the number you

play31:59

entered

play32:00

[Music]

play32:17

validations enable you to create logic

play32:20

controls to verify whether user input is

play32:23

valid or not

play32:24

in this step you will create a

play32:27

validation to check customers credit

play32:28

limit

play32:29

the customer form contains a field named

play32:32

credit limit which is used to assign a

play32:35

credit cap to each customer with a

play32:37

figure of five thousand dollar in the

play32:39

current scenario

play32:40

if you enter a value more than the

play32:42

assigned cap you will be prevented by

play32:44

presenting an appropriate message

play32:47

in the left pane of page 7 click the

play32:49

processing tab right-click the

play32:52

validating node select create validation

play32:54

from the context menu

play32:56

this action will add a new validation

play32:59

set the following properties for this

play33:01

new validation

play33:02

[Music]

play33:14

thank you

play33:16

type the same code as shown on the

play33:19

screen for PL SQL expression property

play33:22

[Music]

play33:37

type this error message

play33:40

note that the validation error message

play33:42

displays only when the validation fails

play33:45

the equality test or evaluates to false

play33:50

this is the second validation to prevent

play33:53

the deletion of those customers who have

play33:55

placed orders

play33:56

[Music]

play34:09

foreign

play34:14

ation is performed using a custom PL SQL

play34:18

function which returns either a true or

play34:20

false value

play34:21

[Music]

play34:38

the return value is based on a select

play34:40

query which returns false if records

play34:43

exist for the selected customer

play34:45

if the returned value is false the error

play34:48

message is displayed and the record

play34:50

deletion process is aborted

play34:52

[Music]

play35:00

this property specifies if you want a

play35:03

validation to execute only when a

play35:05

specific button is clicked

play35:09

[Music]

play35:12

before the final run of this customer's

play35:15

setup modify the wizard generated

play35:17

Dynamic action on page 2 which refreshes

play35:20

the interactive grid page immediately

play35:22

when the form page closes

play35:25

foreign

play35:36

[Music]

play35:50

make sure you're all the properties

play35:52

should match the properties shown in

play35:55

video

play35:58

refresh is an action which executes when

play36:01

the condition evaluates to true in other

play36:04

words after the form page closes

play36:07

all is set save the page and run it

play36:12

the grid has a search bar comprising a

play36:14

magnifying glass a text area and a Go

play36:17

Button

play36:18

the magnifying glass is a drop down list

play36:21

you can use this list to limit your

play36:23

search to a specific column

play36:26

the bar allows you to search a string in

play36:28

the report appearing underneath

play36:30

type Albert in the text area and click

play36:33

the Go Button

play36:34

you will see a row displaying record of

play36:36

Albert Lambert

play36:38

[Music]

play36:42

click the remove filter icon to

play36:45

reinstate the grid to its previous state

play36:48

alternatively you can click the reset

play36:50

button appearing on the top right of the

play36:52

grid

play36:53

[Music]

play36:56

the actions menu carries some more

play36:59

options which will be explored in

play37:00

subsequent videos

play37:03

foreign

play37:05

customer button calls the second page of

play37:08

this setup page 7 where you enter

play37:11

profile of a new customer

play37:13

create a new customer by only filling up

play37:16

the required Fields displaying in red

play37:18

color

play37:19

type first and last names for new

play37:21

customer

play37:23

this was the select list item State Lov

play37:26

which we created in previous steps

play37:29

select any state you like

play37:31

[Music]

play37:35

enter any zip code

play37:42

credit limit value must be less than

play37:44

five thousand dollars

play37:53

this was the input mask which we entered

play37:56

for two phone number items

play37:58

[Music]

play38:02

enter any email address

play38:04

[Music]

play38:12

click create button

play38:14

you might encounter a primary key

play38:16

violation message while creating first

play38:19

customer record

play38:21

this is because the sequence object for

play38:23

this table is created with an initial

play38:25

value of 1.

play38:26

when you try to save the first customer

play38:28

record one is assigned as its primary

play38:31

key which already exists in the table

play38:34

to cope with this situation developers

play38:37

drops and recreate auto-generated

play38:39

sequence objects with a higher start

play38:41

with value

play38:42

to keep things simple I'd suggest

play38:45

beginners to click the create button on

play38:47

the form page several times

play38:49

after a few clicks the record will be

play38:52

saved

play38:53

here's the record you've just created

play38:55

as you can see the customer name column

play38:58

appears as a link

play38:59

if you want to modify a specific record

play39:01

click the corresponding link

play39:04

again the same form page comes up where

play39:07

all the fields are populated with

play39:08

provided information

play39:10

you are free to test your work

play39:13

check the credit limit validation by

play39:15

entering a value more than 5000 in the

play39:18

credit limit box

play39:19

click the apply changes button at the

play39:21

bottom you'll see that error message

play39:24

which you entered while creating this

play39:26

validation

play39:27

[Music]

play39:37

click the name of any other customer

play39:40

try to delete this record

play39:42

you won't be able to do that because

play39:44

there are some orders placed by this

play39:46

customer and the validation you created

play39:48

in previous steps will prevent the

play39:51

deletion process

play39:53

foreign

play40:00

try renaming any record

play40:03

[Music]

play40:20

this is the immediate change without

play40:21

reloading your browser's window

play40:24

this happened because of the

play40:25

wizard-generated dynamic action on page

play40:28

2 which refreshes the interactive grid

play40:30

page immediately when the form page

play40:33

closes

play40:34

here's the summary of what we learned

play40:36

declaratively created report and form

play40:39

pages

play40:40

modified form input items using 12

play40:42

columns grid layout

play40:44

change the default type of an item and

play40:46

used list of values learned how to apply

play40:49

input mask to page items

play40:52

created validations to prevent customer

play40:55

record deletion with existing orders and

play40:57

to check customers credit limits

play40:59

used a dynamic action to automatically

play41:02

refresh a page

play41:03

thanks for watching

play41:05

[Music]

Rate This

5.0 / 5 (0 votes)

相关标签
Customer ProfilesOracle ApexInteractive GridForm ManagementDatabase EditingSQL QueriesData ManipulationWeb ApplicationUser InterfaceDevelopment Tutorial
您是否需要英文摘要?