Intro to Oracle Form Personalization

download Intro to Oracle Form Personalization

of 31

description

Intro to Oracle Form Personalization

Transcript of Intro to Oracle Form Personalization

  • 5/21/2018 Intro to Oracle Form Personalization

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

    Introduction to

    Form Personalization

  • 5/21/2018 Intro to Oracle Form Personalization

    2/31Copyright 2004, Oracle. All rights reserved.1-2

    After completing this module, you should be able to dothe following:

    Invoke the Personalizations form

    Understand the basic structures : Rules, Context,

    and Actions

    Make simple changes like changing prompts andhiding objects

    Select objects by their current on-screen text

    Get the current value for properties

    Apply changes immediately to test their effect

    Disable personalizations

    Objectives

  • 5/21/2018 Intro to Oracle Form Personalization

    3/31Copyright 2004, Oracle. All rights reserved.1-3

    If you are not familiar with the basic construct of anOracle Developer form, including terms such asblock, record, item, trigger, property andbuiltin, youshould consider a course such as OracleDeveloper: Forms Fundamentals, offered by Oracle

    University.

    The viewlet Oracle Applications FormPersonalization Demonstrationshows many of theconcepts included in this module.

    Related Course Material

  • 5/21/2018 Intro to Oracle Form Personalization

    4/31Copyright 2004, Oracle. All rights reserved.1-4

    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

  • 5/21/2018 Intro to Oracle Form Personalization

    5/31Copyright 2004, Oracle. All rights reserved.1-5

    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 withoutviolating Support agreements

    Your wish is granted!

  • 5/21/2018 Intro to Oracle Form Personalization

    6/31Copyright 2004, Oracle. All rights reserved.1-6

    Overview of Form Personalization

    Allows you to make declarative changes to aform.

    Changes get applied at runtime when the

    proper trigger event occurs.

    Changes can get applied based on who you areand other conditions

    You can:

    Change object properties

    Execute certain Forms builtins Display messages

    Activate menu entries

  • 5/21/2018 Intro to Oracle Form Personalization

    7/31Copyright 2004, Oracle. All rights reserved.1-7

    Form Personalizations allows you to

    fundamentally alterthe behaviorof theproduct that Oracle ships, and access any andall 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 QAed on a testsystem before they are loaded to aproduction system

    WARNING!

  • 5/21/2018 Intro to Oracle Form Personalization

    8/31Copyright 2004, Oracle. All rights reserved.1-8

    Invoking the Personalization screen

    Run the form that you want to modify

    Select Help > Diagnostics > CustomCode >Personalize from the pulldown menu

    Profiles Utilities: Diagnosticsand Hide Diagnosticsmenu entrycontrol access to this entry

    The Personalizations screen will now run

    It will automatically query any rules if they exist for thatfunction

  • 5/21/2018 Intro to Oracle Form Personalization

    9/31Copyright 2004, Oracle. All rights reserved.1-9

    Rules and Conditions

  • 5/21/2018 Intro to Oracle Form Personalization

    10/31Copyright 2004, Oracle. All rights reserved.1-10

    Rules govern whenpersonalizations 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 causesinvocation of the rule

    Trigger object: the context for the trigger event, such as aparticular block or item

    Condition: an optional SQL fragment that, when it evaluatesto TRUE, allows the rule to execute. An Advanced classdescribes Conditions.

    Rules and Conditions, continued

  • 5/21/2018 Intro to Oracle Form Personalization

    11/31Copyright 2004, Oracle. All rights reserved.1-11

    Context

  • 5/21/2018 Intro to Oracle Form Personalization

    12/31

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

    Context controls whopersonalizations apply to:

    Level: Site, Responsibility, Industry, or User

    Value: The specific value when level isResponsibility, Industry, or User

    At runtime, if the users context matches anycontext of a rule, that rule is executed.

    Context , continued

  • 5/21/2018 Intro to Oracle Form Personalization

    13/31

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

    Actions determine whatthe 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 toshow additional fields

    Description: allows you to record why you aremaking the change

    Language: a list of installed languages, and ALL

    An action associated with a specific languagewill only be executed in the context of thatlanguage

    Enabled: used to temporarily disable an action

    Actions , continued

  • 5/21/2018 Intro to Oracle Form Personalization

    14/31

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

    Actions: Property

    Used to set a property of an item

    Select By Text: choose an object by its 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

  • 5/21/2018 Intro to Oracle Form Personalization

    15/31

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

    Actions: Property Example

    This action:

    Changes this screen: To this:

  • 5/21/2018 Intro to Oracle Form Personalization

    16/31

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

    Actions: Message

    Used to display a popup message

    Message Type: Error, Warning, Hint, Question, Debug

    Message Text: the text of the message

  • 5/21/2018 Intro to Oracle Form Personalization

    17/31

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

    Actions: Message Example

    This action:

    Causes this dialog

    to appear:

  • 5/21/2018 Intro to Oracle Form Personalization

    18/31

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

    Actions: Builtin

    Used to perform processing by calling Forms and AOLfunctions

    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

  • 5/21/2018 Intro to Oracle Form Personalization

    19/31

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

    Actions: Builtin Example

    This action:

    Opens the

    Responsibilities

    form (if the userhas permission):

  • 5/21/2018 Intro to Oracle Form Personalization

    20/31

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

    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 beenabled.

    Leave blank for all blocks.

    Icon Name: the name of a .ico file

  • 5/21/2018 Intro to Oracle Form Personalization

    21/31

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

    Actions: Special Example

    This action:

    Activates the Tools

    menu and creates

    the menu entry, forall blocks of the

    form:

  • 5/21/2018 Intro to Oracle Form Personalization

    22/31

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

    Working with Strings

    Every property that takes a string can work one of

    two ways If the string you type does notstart with =,

    then it be used exactly as you typed it

    If the string you type startswith =, then it will

    be evaluatedat 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 OUTparameters

  • 5/21/2018 Intro to Oracle Form Personalization

    23/31

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

    Working with Strings Example

    This action:

    Causes this dialog

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

  • 5/21/2018 Intro to Oracle Form Personalization

    24/31

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

    Various features and functions are available to assist you:

    Trigger and Target Objects are validated

    Add buttons: allow you to select objectswithin the form using lists

    Apply Now: applies the current action immediately soyou can see its effect

    Validate: for fields that support string evaluation,processes it immediately:

    Conditionwill return True, False, or an Error

    Valuewill return the resulting string, or an Error

    Add messages of Type Debug They will only display when Show Debug Messagesis

    checked

    Getting it right

  • 5/21/2018 Intro to Oracle Form Personalization

    25/31

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

    It is possible that a change you make completely breaks aform, to the point that it will not even run! Heres how torecover:

    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 theproblem

    On the pulldown menu, choose Help > Diagnostics >Custom Code > Normal to re-enable processing ofPersonalizations

    Getting it right, continued

  • 5/21/2018 Intro to Oracle Form Personalization

    26/31

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

    This is a step-by-step example of changing a prompt. Inthis case, we will modify the 'Users' form, and changethe prompt User Nameto Clerk Name:

    1. Open the Users form

    2. Select Help > Diagnostics > Custom Code >Personalize from the pulldown menu.

    3. 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

    Putting it all Together

  • 5/21/2018 Intro to Oracle Form Personalization

    27/31

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

    Putting it all Together, continued

    4. Select the Actions Tab and enter the following values:

    Seq: 1 Press the Select By Textbutton and choose the User

    Namerow from the LOV

    Property Name: PROMPT_TEXT

    Value: Clerk Name

    Accept the defaults for all other values of the Actions

    5. Save

    6. Activate the Users form, then close it.

    7. Re-open the Users form. You should see that the

    prompt is now Clerk Name.

    8. To disable this Rule, set Enabled to unchecked (ateither the Rule or Action level), or just delete the Rule,then Save.

  • 5/21/2018 Intro to Oracle Form Personalization

    28/31

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

    Limitations

    Although it is faster than a speeding bullet, it is not able toleap 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

  • 5/21/2018 Intro to Oracle Form Personalization

    29/31

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

    Limitations, continued

    May interfere with, or be overridden by, base

    product code Expected user is an Admin/Developer

    Knowledge of Oracle Developer is extremelydesirable

    Knowledge of PL/SQL, Coding Standards and/orAPIs required in some cases

    Normal rules for customizations apply

    Extensive testing in a Test environmentis required!

  • 5/21/2018 Intro to Oracle Form Personalization

    30/31

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

    Relationship to CUSTOM library

    CUSTOM is a stub library Oracle ships thatreceives Trigger Events. Customers are free toadd 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.

  • 5/21/2018 Intro to Oracle Form Personalization

    31/31

    Copyright 2004 Oracle All rights reserved1 31

    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 hidingobjects

    Get the current value for properties

    Apply changes immediately to test their effect

    Disable personalizations