You are on page 1of 31

Introduction to

Form Personalization

1-1 Copyright © 2004, Oracle. All rights reserved.


Objectives

After completing this module, you should be able to do


the following:
 Invoke the Personalizations form
 Understand the basic structures : Rules, Context,
and Actions
 Make simple changes like changing prompts and
hiding objects
 Select objects by their current on-screen text
 Get the current value for properties
 Apply changes immediately to test their effect
 Disable personalizations

1-2 Copyright © 2004, Oracle. All rights reserved.


Related Course Material

 If you are not familiar with the basic construct of an


Oracle Developer form, including terms such as
block, record, item, trigger, property and builtin, you
should consider a course such as Oracle
Developer: Forms Fundamentals, offered by Oracle
University.
 The viewlet Oracle Applications Form
Personalization Demonstration shows many of the
concepts included in this module.

1-3 Copyright © 2004, Oracle. All rights reserved.


Agenda
 Overview of Form Personalization
 Rules and Conditions
 Context
 Actions
 Working with Strings
 Getting it right
 Putting it all Together
 Limitations
 Relationship to CUSTOM library
 Summary

1-4 Copyright © 2004, Oracle. All rights reserved.


All customers wish to:
 Remove fields, buttons, tabs, etc. from the screen
because they never use them
 Re-label fields, buttons, tips to match their terminology
 Change the default value of fields
 Allow easy access from one form to another, passing
context
 Do any of the above for only a particular user or
responsibility
 Do any of the above only if certain conditions are true.
 Do all of the above without writing code, and without
violating Support agreements

Your wish is granted!


1-5 Copyright © 2004, Oracle. All rights reserved.
Overview of Form Personalization
• Allows you to make declarative changes to a
form.
• Changes get applied at runtime when the
proper trigger event occurs.
• Changes can get applied based on who you are
and other conditions
• You can:
• Change object properties
• Execute certain Forms builtins
• Display messages
• Activate menu entries

1-6 Copyright © 2004, Oracle. All rights reserved.


WARNING!
Form Personalizations allows you to
fundamentally alter the behavior of the
product that Oracle ships, and access any and
all data. Therefore,
 This feature should only be made available to
trusted users.
 Avoid building Personalizations on a production
system.
– Form Personalizations should first be
entered and thoroughly QA’ed on a test
system before they are loaded to a
production system

1-7 Copyright © 2004, Oracle. All rights reserved.


Invoking the Personalization screen

 Run the form that you want to modify


 Select Help > Diagnostics > CustomCode >
Personalize from the pulldown menu
– Profiles ‘Utilities: Diagnostics’ and ‘Hide Diagnostics
menu entry’ control access to this entry
 The Personalizations screen will now run
– It will automatically query any rules if they exist for that
function

1-8 Copyright © 2004, Oracle. All rights reserved.


Rules and Conditions

1-9 Copyright © 2004, Oracle. All rights reserved.


Rules and Conditions, continued
Rules govern when personalizations get evaluated:
 Function Name: the name of the function that you ran.
Personalizations are made for a function, not a form.
 Seq: an ordering from 1 (first) to 100 (last)
 Description: allows you to record why you are making the
change
 Enabled: used to temporarily disable a rule
 Trigger Event: the event within the form that causes
invocation of the rule
 Trigger object: the context for the trigger event, such as a
particular block or item
 Condition: an optional SQL fragment that, when it evaluates
to TRUE, allows the rule to execute. An Advanced class
describes Conditions.
1-10 Copyright © 2004, Oracle. All rights reserved.
Context

1-11 Copyright © 2004, Oracle. All rights reserved.


Context , continued
Context controls who personalizations apply to:
 Level: Site, Responsibility, Industry, or User
 Value: The specific value when level is
Responsibility, Industry, or User
 At runtime, if the user’s context matches any
context of a rule, that rule is executed.

1-12 Copyright © 2004, Oracle. All rights reserved.


Actions , continued
Actions determine what the personalization does:
 Seq: an ordering from 1 (first) to 100 (last)
 Type: Property, Message, Builtin, or Special
– Depending on the Type, the panel will change to
show additional fields
 Description: allows you to record why you are
making the change
 Language: a list of installed languages, and ‘ALL’
– An action associated with a specific language
will only be executed in the context of that
language
 Enabled: used to temporarily disable an action

1-13 Copyright © 2004, Oracle. All rights reserved.


Actions: Property

Used to set a property of an item


 Select By Text…: choose an object by it’s onscreen text
 Object Type and Target Object: internal identifier of the object
 Property Name: the property to change
 Value: the new value
 Get Value: extract the current property value into the Value field

1-14 Copyright © 2004, Oracle. All rights reserved.


Actions: Property Example

This action:

Changes this screen: To this:

1-15 Copyright © 2004, Oracle. All rights reserved.


Actions: Message

Used to display a popup message


 Message Type: Error, Warning, Hint, Question, Debug
 Message Text: the text of the message

1-16 Copyright © 2004, Oracle. All rights reserved.


Actions: Message Example

This action:

Causes this dialog


to appear:

1-17 Copyright © 2004, Oracle. All rights reserved.


Actions: Builtin

Used to perform processing by calling Forms and AOL


functions
 Builtin Type:
– GO_ITEM and GO_BLOCK
– DO_KEY
– RAISE FORM_TRIGGER_FAILURE,
– FORMS_DDL
– FND_UTILITIES.OPEN_URL
– FND_FUNCTION.EXECUTE
 Arguments vary based on the Type

1-18 Copyright © 2004, Oracle. All rights reserved.


Actions: Builtin Example

This action:

Opens the
Responsibilities
form (if the user
has permission):

1-19 Copyright © 2004, Oracle. All rights reserved.


Actions: Special

Used to activate up to 45 pre-seeded menu entries


 Menu Entry: SPECIAL1 through SPECIAL45
 Menu Label: the text for the menu entry
 Render Line before menu: will draw a line above the menu entry
 Enabled In Block(s): the blocks for which the menu entry should be
enabled.
– Leave blank for all blocks.
 Icon Name: the name of a .ico file

1-20 Copyright © 2004, Oracle. All rights reserved.


Actions: Special Example

This action:

Activates the Tools


menu and creates
the menu entry, for
all blocks of the
form:

1-21 Copyright © 2004, Oracle. All rights reserved.


Working with Strings
Every property that takes a string can work one of
two ways
 If the string you type does not start with ‘=’, then
it be used exactly as you typed it
 If the string you type starts with ‘=’, then it will
be evaluated at runtime. You can refer to:
– bind variables, like :block.field
– SQL operators, such as ||, TO_CHAR(), DECODE(),
and NVL()
– Server-side functions that do not have OUT
parameters

1-22 Copyright © 2004, Oracle. All rights reserved.


Working with Strings Example

This action:

Causes this dialog


to appear
(when run on 25-AUG-04):

1-23 Copyright © 2004, Oracle. All rights reserved.


Getting it right
Various features and functions are available to assist you:
 Trigger and Target Objects are validated
 ‘Add <object>’ buttons: allow you to select objects
within the form using lists
 ‘Apply Now’: applies the current action immediately so
you can see it’s effect
 ‘Validate’: for fields that support string evaluation,
processes it immediately:
– ‘Condition’ will return True, False, or an Error
– ‘Value’ will return the resulting string, or an Error
 Add messages of Type ‘Debug’
– They will only display when ‘Show Debug Messages’ is
checked

1-24 Copyright © 2004, Oracle. All rights reserved.


Getting it right, continued
It is possible that a change you make completely breaks a
form, to the point that it will not even run! Here’s how to
recover:
 On the pulldown menu, choose Help > Diagnostics >
Custom Code > Off
– This will disable all callouts to Forms Personalization
 Run the form of interest
– It should run now, because your changes were skipped
 Invoke the Personalization screen and correct the
problem
 On the pulldown menu, choose Help > Diagnostics >
Custom Code > Normal to re-enable processing of
Personalizations

1-25 Copyright © 2004, Oracle. All rights reserved.


Putting it all Together
This is a step-by-step example of changing a prompt. In
this case, we will modify the 'Users' form, and change
the prompt ‘User Name’ to ‘Clerk Name’:
 Open the Users form
 Select Help > Diagnostics > Custom Code >
Personalize from the pulldown menu.
 Create a rule with the following values:
 Seq: 1
 Description: Change prompt of User Name
Accept the defaults for all other values of the Rule and
Context

1-26 Copyright © 2004, Oracle. All rights reserved.


Putting it all Together, continued
 Select the Actions Tab and enter the following values:
• Seq: 1
• Press the ‘Select By Text’ button and choose the ‘User
Name’ row from the LOV
• Property Name: PROMPT_TEXT
• Value: Clerk Name
Accept the defaults for all other values of the Actions
3. Save
4. Activate the Users form, then close it.
5. Re-open the Users form. You should see that the
prompt is now ‘Clerk Name’.
6. To disable this Rule, set Enabled to unchecked (at
either the Rule or Action level), or just delete the Rule,
then Save.

1-27 Copyright © 2004, Oracle. All rights reserved.


Limitations
Although it is faster than a speeding bullet, it is not able to
leap over tall buildings:
 You can only change what Forms allows at runtime:
– Cannot create new items
– Cannot move items between canvases
– Cannot display an item which is not on a canvas
– Cannot set certain properties
– Cannot change frames, graphics, boilerplate
 You can only respond to certain Trigger Events:
– WHEN-NEW-FORM-INSTANCE, WHEN-NEW-BLOCK-
INSTANCE, WHEN-NEW-RECORD-INSTANCE, WHEN-
NEW-ITEM-INSTANCE
– WHEN-VALIDATE-RECORD (not in all forms)
– Product-specific events

1-28 Copyright © 2004, Oracle. All rights reserved.


Limitations, continued

 May interfere with, or be overridden by, base


product code
 Expected user is an Admin/Developer
– Knowledge of Oracle Developer is extremely
desirable
– Knowledge of PL/SQL, Coding Standards and/or
APIs required in some cases
 Normal rules for customizations apply
– Extensive testing in a Test environment
is required!

1-29 Copyright © 2004, Oracle. All rights reserved.


Relationship to CUSTOM library

 CUSTOM is a stub library Oracle ships that


receives Trigger Events. Customers are free to
add any code they like to it.
 CUSTOM and Form Personalizations drive off
the same Trigger Events
– Form Personalizations are processed first, then the
event is sent to CUSTOM
 CUSTOM can do more because it has complete
access to all PL/SQL and SQL
 But for most changes, Form Personalizations is
adequate and is significantly simpler.

1-30 Copyright © 2004, Oracle. All rights reserved.


Summary
In this module, you should have learned how to:
Invoke the Personalizations form
Build a Rule and Action
Select objects by their current on-screen text
Make simple changes like changing prompts and hiding
objects
Get the current value for properties
Apply changes immediately to test their effect
Disable personalizations

1-31 Copyright © 2004, Oracle. All rights reserved.

You might also like