Oracle HRMS FORMS Personalization

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

Forms Personalization

Oracle Applications
Release 11.5.10

Objectives of this session

1.

Forms Personalization: Need and benefits.

2.

Understand Rules, Condition, Context and Actions.

3.

Build rules that fire conditionally.

4.

Understand Sequencing.

5.

Use string evaluation.

6.

Use Validate feature to confirm Conditions & Strings.

7.

Understand Multilingual Issues.

8.

Know the most commonly used Actions.

9.

Debugging features available in Personalization.

10. Form Personalization v/s Form Customization.


11. Personalization Database Tables
Version 1.0

What is Forms Personalization ?


The Form Personalization feature allows you to declaratively alter the behavior of
Forms-based screens, including

Changing properties
Executing built-ins
Displaying messages
Adding menu entries.
. Form Personalization is independent to each form. This means the personalization done
on one form will not reflect on other form.
. The form mainly contains four sections. They are
Rules, Conditions
Context
Actions
The Need
Most of the customers wish to modify the way the forms look and behave. They want to
change the labels on the form fields, hide fields, hide buttons, amend custom logic etc.
The motives could be
Managing un-necessary fields.
To match the customer specific business requirements.
To match the language (lingo) used by the customer.

Version 1.0

Warning
Form Personalizations allows you to fundamentally alter the
behavioroftheproductthatOracleships,andaccessANYandALL
data.Therefore,thisfeatureshouldonlybemadeavailabletotrusted
users.

2.

Avoid building Personalizations on a production system directly.


FormPersonalizationsshouldfirstbeenteredandthoroughlytestedon
aTestSystembeforetheyareactuallyloadedtoaproductionsystem.

Important:
By default the Personalize menu is visible to all the users; this can be
controlled with help of profile options. By setting up the below profile
options, the access to the Personalize menu can be limited for the authorized
users. This will prevent unauthorized users from changing the look and
behavior of the forms.
The profile options are Utilities: Diagnostics = Yes/No
Hide Diagnostics
= Yes/No
Version 1.0

WARNING

1.

How to Invoke Forms Personalization


MenuNavigation:HelpDiagnosticsCustomCodePersonalize

Version 1.0

Rules

1.
2.
3.
4.
5.

Rulesadministerthepersonalizationneedstobeimplementedontheform.
Eachrulecontainsasequencenumberandthedescription.
TherulecanbeactivatedordeactivatedusingtheEnabledcheckbox.
Therulecanbedeletedwhennolongerneeded.
Defining rules doesnt identify when the rule should get evaluated or
applied. For each rule, there should be conditions attached which power
theexecutionoftherule.

Forexample:
1.ARulecanbeChangetheOrderNumberprompttoClaimNumber.
2.HideCustomerfield.

Version 1.0

Condition

TriggerObject
TriggerEvent
Condition
ProcessingMode

Validate

Version 1.0

Condition
Condition decide the event the rule to be executed.
Each condition mainly contains three sections. They are
Trigger Event: Trigger Event specifies the occurrence where
the rule should be executed.
Trigger Object: Trigger Object is the object on the form to
determine at what level the rule should be executed.
The values can be <Form Name>, <Block Name> or <Item Name>

Condition: Condition is any SQL statement to control the


execution of rule when the mentioned criterion is met.

Version 1.0

Condition : Trigger Event & Trigger Object

Version 1.0

Condition : Trigger Event & Trigger Object

All E-Business Suite forms send the following events:

Version 1.0

WHEN-NEW-FORM-INSTANCE: Once, when the form starts up.


Trigger Object does not apply.
WHEN-NEW-BLOCK-INSTANCE: Each time the cursor moves to a
new block. Trigger Object must contain the blockname of interest.
WHEN-NEW-RECORD-INSTANCE: Each time the cursor moves to a
new record. Trigger Object must contain the blockname of interest.
WHEN-NEW-ITEM-INSTANCE: Each time the cursor moves to a new
item. Trigger Object must contain the blockname.itemname of interest.

10

Condition : Trigger Event & Trigger Object

Many forms send the following event:

WHEN-VALIDATE-RECORD: each time the current record has


any change that needed to be validated. Trigger Object must contain
the blockname of interest.

Some forms send custom events

For example, a form may send a message like REPRICE-ITEM at


a specific event within its processing.
We seed the Trigger Event item with the standard events, but you
can type other events into the field too.

Note: To Know what events a form sends :

Version 1.0

1.

Menu Navigation: Help Diagnostics Custom Code Show Events

2.

Run the form of interest and a dialog will appear each time an event is sent

3.

Turn this mode off by selecting Help > Diagnostics > CustomCode > Normal

11

Condition: Condition / Process Mode / Validate

Version 1.0

12

Condition: Condition
I. Condition :
1. The Condition field lets you create an expression in SQL.

If it is empty or evaluates to TRUE at runtime, then the Actions are


performed.
If it evaluates to FALSE at runtime, then the Actions are skipped.
The Condition is re-evaluated EACH time the rule is processed.

2. The Condition expression can refer to:


Bind variables, like :block.field
SQL operators, such as || (Concatenation), TO_CHAR( ),
and NVL( )
Server-side functions that do not have OUT parameters.

DECODE( )

Examples:
1. :users.user_name is not null and :users.description is null
TRUE if the User Name has a value & the Description doesnt have
value
2. sysdate >= to_date(1-1-2005, DD-MM-RRRR)
TRUE if todays date is equal to or greater than January 1, 2005.
Version 1.0

13

Condition: Processing Mode & Validate

II. Processing Mode:


1. Not in Enter Query Mode: The Rule will not be executed in Enter Query Mode.
2. Only in Enter Query Mode: The Rule will be executed in Enter Query Mode
only.

3. Both: The Rule will be executed in both the Enter & Execute query modes.
III. Validate :
1. When you press the Validate button, the Condition will process immediately
and return either True, False, or an Error.
2. Errors are in standard ORACLE error format, with an ORA error number.

Version 1.0

14

Context

Version 1.0

15

Context
Context manages to whom the personalization should apply.
This is similar to the concept of using profile options in Oracle
Applications with a slight difference. We will see this in next
slide.
The various levels are Site, Responsibility, Industry and User.
During runtime, the values provided in the context are evaluated
and personalization rules will be applied.
Usage of context is very vital in implementing the
personalization to prevent the inappropriate users accessing
these personalization of the form.
Example : Context = Responsibility
Value = Customer Support

The scope of 'Industry' is reserved for future.


Version 1.0

16

Context is not a hierarchy

Version 1.0

1.

If a Rule has a context of Site, it will be applied for everyone.

2.

A rule with a context of Responsibility does not override Site.

3.

A rule with a context of User does not override Site or


Responsibility.

4.

If 2 rules have the same Trigger Event, and Actions that change the
same property, the rule with the higher sequence number will be
performed last, thus it will WIN.

17

Actions

Version 1.0

18

Actions
Actions decide the exact operation to be performed when the conditions
and context return TRUE during the runtime.
Usually each rule should be associated with at least one action.
The types of actions available are
Property
Message
Builtin
Special
Each Action contains a Sequence number, Description and
Language.
Based on the action type selected, the fields on the right sector of
the actions tab will be refreshed where the action parameters are
entered.
Actions can be enabled, disabled or deleted.
Version 1.0

19

Actions: Sequence

1. BothRulesandActionshaveaSequencethatmustbeentered.
2. Itisthereincaseyouneedthingstobeprocessedinaspecific
order.
3. Thesequencedoesnothavetobeunique.
4. ForanAction,theSequenceisveryimportantinvarioussituations,
forexample:

Version 1.0

WhenusingBuiltins,youmightfirstmovethecursortoa
particularblock,thenissueaqueryinthatblock.
WithProperties,ifyouaremovinganitemyoumightfirst
havetomakethecanvasadifferentsize.

20

Actions Type: Property


TheactiontypePropertyisusedtosetthepropertiesoftheobjects.
ThevariousobjectsincludeItem,Window,andBlocketc.
Actualobjectnamedefinedintheformshouldbeenteredafter
selectingtheobjecttype.
PropertyNameisthePropertytobechanged.
Valueisthenewdesiredvaluefortheproperty.
Thecurrentvalueofthepropertywillbedisplayedwhenclicked
ontheGetValuebutton.
Example:
ObjectType=Item,

TargetObject=:ORDER.ORDER_NUMBER
PropertyName=PROMPT_TEXT

Value=ClaimNumber

Thevaluecanbeinterpretedatruntime,soyoucanuseSQL
functionsandoperators.
Anyvaluestartwith=operatorwillbeinterpretedatruntime,
otherwisethevalueistreatedasisenteredinthevaluefield.
Example:Value=>=WelcometotheSalesOrderEntryMr.||user.
Version 1.0

21

Common Actions of type Property

For Items (Fields):


PROMPT_TEXT: The prompt of the item, typically next to or above the item
DISPLAYED: If False, the item is hidden
INITIAL_VALUE: The value to default on a new record. This can only be set in
the WHEN-NEW-RECORD-INSTANCE event
LABEL: The label of a button, checkbox or radio button
REQUIRED: If True, the user must enter a value.
TOOLTIP_TEXT: The bubble tip on the item. X and Y_POS: The location on the
canvas, in inches.
WIDTH: The width, in inches. VALUE: Copy a value into the item, as if the user
typed it.
Version 1.0

22

Common Actions of type Property


For Tab Pages:
DISPLAYED: If False, the tab page is hidden. Note that keyboard navigation may
need to be changed to prevent access to items on the page
LABEL: the title of the tab

For Canvasses:
TOPMOST_TAB_PAGE: Determines the currently selected Tab Page.

For Windows:
TITLE: the title of the window
X and Y_POS: the location within the MDI window, in inchesFor Blocks:
DEFAULT_WHERE: the WHERE clause of the SQL statement controlling queried
records
ORDER_BY: the ORDER_BY clause of the SQL statement of the queried records
INSERT_ALLOWED: if False, prevents the user from creating new records
UPDATE_ALLOWED: if False, prevents the user from updating any item in a
queried record
DELETE_ALLOWED: if False, prevents the user from deleting queried records

Version 1.0

23

Actions Type: Message

The action type Message is used to display custom messages during runtime.
Message Type and Description should be entered after selecting the action type as
Message.
The available message types are
Show

Hint Error

Debug

Warn

Depending on the response expected from the user, the appropriate message type should be
selected.
Example: Message Type = Hint
Message Text = Please Follow the Date format DD-MON-YYYY
Version 1.0

24

Common Actions of type Message

Show:

Displays a message of type Note, with an OK button.

Hint:

Displays text on the message line

Error:

Displays a message of type Error, with an OK button. Processing is


aborted afterwards.

Debug: Displays a message of type Note, with an OK button. Only displays


when Display Debug messages is checked.
Warn:

Version 1.0

Displays a message of type Question, with OK and Cancel buttons.


If the user selects Cancel, processing is aborted.

25

Actions Type: Builtin

TheactiontypeBuiltinisusedtoexecutetheformandAOLAPIs.
DependingontheAPItypeselected,theparametersshouldbeentered.
Example: BuiltinType=FND_UTILITIES.OPEN_URL
Argument=http://dms.dell.com

Version 1.0

26

Common Actions of type Builtin

GO_ITEM and GO_BLOCK: Move the cursor to a specific item or the first
item in a block

DO_KEY: Acts like a macro, simulating user actions.

Common Arguments:

ENTER_QUERY: invoke QBE mode

EXECUTE_QUERY: execute the query

NEXT and PREVIOUS_BLOCK: move to another block

NEXT and PREVIOUS_ITEM: move to another item

FND_UTILITIES.OPEN_URL: Launch a URL. Can be as simple as


www.yahoo.com, or as complex as a Discoverer page

FND_FUNCTION.EXECUTE: Open a function, applying security rules.


Parameters can be passed if the target accepts them.

Version 1.0

27

Actions Type: Special

Version 1.0

28

Actions Type: Special

TheactiontypeSpecialisusedtoactivatetheavailablespecial
menusontheToolsmenu.

OracleApplicationsprovide45specialmenusunderToolsmenuwhich
canbeusedbycustomersbasedontheirrequirements.

SelecttheSPECIALmenuwhichisnotusedbytheform.
MenulabelisthepromptwhichappearstotheuserswhenToolsmenuis
invoked,blockspecifiestheblocksforwhichthespecialmenushouldbe
activated
Iconnameisthe.icofilename.

Aseparatorcanbecreatedabovetheactivatedspecialmenubyselecting
theRenderlinebeforemenucheckbox.
Example:
MenuEntry=SPECIAL4
MenuLabel=AdditionalCustomerInformation
EnabledinBlocks(s)=Customer
IconName=Flower.ico

Version 1.0

29

Triggers Conditions Sequences Actions

In short heres how it all works:

When an event occurs in the form, we look for all enabled rules
that match that Trigger Event and Trigger Object.

Starting with the Rule that has the lowest sequence,

Version 1.0

if the Condition is empty or evaluates to TRUE, we


process each enabled Action, in the order of the
Action Sequence.

Then we look for the next-highest sequenced Rule and


process it, until there are no more Rules for that Event.

30

Working with Strings in Value Field


Every property that takes a string can work one of two ways
If the string you type does not start with =, then it will 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 etc
SQL operators, such as ||, TO_CHAR(), DECODE(), and NVL()
Server-side functions that do not have OUT parameters.
String Typed In

Version 1.0

Result at Runtime

='Your password will expire on '||


(sysdate+7)

Your password will expire on 31-DEC-2004


{if sysdate is currently 24-DEC-2004}

='Your password must have at least


'||:context.passwd_length||' characters.'

Your password must have at least 8 characters.


{if passwd_length has a value of 8}

=User: ||NVL(:user.user_name,
New)

User: SYSADMIN {if :user.user_name is SYSADMIN}


User: New {if :user.user_name is null}

=The field value is:


:items.part_number

{an ORACLE error because the syntax is incorrect. It


should be: =The field value is: || :items.part_number}
31

Multilingual Issues

Version 1.0

Some Actions are insensitive to language, such as setting the


Required property for a field.
For these, set the Language to All

But many Actions have text, such as Properties (PROMPT_TEXT,


LABEL, TOOLTIP), Messages (Message Text), and Special
(Menu Label)
For these, create one Action per language
Pick the appropriate language, and enter the proper text for
that language

Dont create Conditions that are language sensitive


Refer to internal values of fields, not displayed values

32

Multilingual Issues

Youcancountonnumberstobeconfusing!

Depending on your profiles, you may see numbers in fields as


1234.56or1234,56

However, much of Forms Personalization involves SQL


fragments, which require that numbers always be in english
format(1234.56).

So,regardlessofwhatyourcurrentsettingsare,enterallnumeric
valuesinenglishformat
Examples:
SettingtheWIDTHproperty:2.5
Creating a Condition based on the value of a numeric
field::block.field>=2.5

Version 1.0

33

Multilingual Issues

Lets Check for Date

Version 1.0

WRONG:
sysdate >= to_date(1-JAN-05)
JAN will not mean January in all languages
Always specify an exact mask when converting a string to a date
Avoid Y2K issues enter years with all 4 digits

RIGHT:
sysdate >= to_date(1-1-2005, DD-MM-RRRR)

34

Debugging: Why isnt it running ?


A rule or action may not run for a variety of reasons:

Version 1.0

The Rule or Action is not enabled .


The Condition has evaluated to FALSE .
The Trigger Event and/or Trigger Object were not what you expected
The scope of the rule only consists of Responsibility, Industry and/or
User, and none is true for the current context
An action is executing the Builtin 'RAISE
FORM_TRIGGER_FAILURE' . That will abort all further processing
for that event.
The Language of the Action, if not All, is different than what you are
currently running
You have set Custom Code to Off or Core code only in the
pulldown menu.
Rules are created for a Function. You might be running the same form,
but as a different function.

35

Debugging: Is it really running ?


It may not be obvious that your change was applied in some cases.
To resolve that:

Version 1.0

Create a Message of Type Debug after the Action of interest. Add


some useful text.

Save your changes.

Check the Display Debug messages checkbox.

Re-run the form.

You should see your message pop up when the proper event occurs.

36

Debugging: Why isnt is sticking ?


Often an Action may execute, but by the time control returns to the user the
property you set has been overridden. What can you do?

Try performing the action at a lower event.

Be aware of item vs. item-instance properties.

Version 1.0

Properties that affect all records of a block: set at WHEN-NEWBLOCK-INSTANCE or WHEN-NEW-RECORD-INSTANCE


Properties that affect a specific item in a block: set at WHEN-NEWITEM-INSTANCE
The downside of the lower events is that they fire more frequently,
and they may yield a misleading UI (for example, a field may look to
be updateable until you navigate into it)
item level affects all instances of that item.
item-instance affects only the current row of that item.
If a property is off at item level, it cannot be turned on at iteminstance level.
37

Debugging: How to stop personalization ?

It is possible that a change you make completely breaks a form, to the


point that it will not even run! Heres how to recover :

Version 1.0

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.

38

Form Personalization v/s Form Customization


Personalization

Customization

Not Require CUSTOM library

Mainly use CUSTOM library

For a limited functionality like hiding


columns, changing labels and showing
custom messages etc. (Look & Feel)

To Implement the complex business logic

Easy, faster and requires minimum


development effort.

Depends on the complexity of business


logic and require considerable
development effort.

Doesnt violate the support from Oracle


and these rules also conceded with the
future upgrades without any additional
effort.

Version 1.0

39

Form Personalization: Database Tables

Some of the Important Database tables for personalization


FND_FORM_CUSTOM_RULES
FND_FORM_CUSTOM_ACTIONS
FND_FORM_CUSTOM_PARAMS
FND_FORM_CUSTOM_PROP_LIST
FND_FORM_CUSTOM_PROP_VALUES
FND_FORM_CUSTOM_SCOPES

Version 1.0

40

Summary
In this session we have seen :

Version 1.0

Forms Personalization

Build rules associated with the proper Trigger Event

Build rules that fire conditionally

Use Sequencing

Use the Validate feature to confirm Conditions and Strings

Use string evaluation

Handle multilingual situations

Use the most commonly used Properties, Builtins and Messages

Use debugging features

41

Thank You

Version 1.0

42

You might also like