Use Form builder to create a form

Source: Internet
Author: User

UseOracle form BuilderCreateFormProcedure

(Data SourceIsTable)

 

  • Note: When the data source used by the block is table, the form will automatically insert, update, delete, and lock. To display non-database item, you must manually write code in post-query trigger to set the value of non-database item.

 

Step 1: analyze the requirements and design tableArchitecture

  • 1). You must specify a unique ID for the table, and create a unique index for it. assign values to the table through sequence in form.
  • 2). Table and sequence are created under the specified custom owner (such as cux ).
  • 3). Naming rules: the name of the XX + module starts with "_ s" after the sequence name is added to the table name"
    For example, table name: cux. xxpo_po_headers
    Sequence name: cux. xxpo_po_lines_s
  • 4). The table should have the following five columns (refer to the system standard table ):
    Created_by
    Creation_date
    Last_updated_by
    Last_update_date
    Last_update_login
  • 5). Create a synonym (Synonym) for the table and sequence of the customized owner (such as cux) in apps ).

 

Step 2: Apply formTemplate. FMB

  • 1). Enable the template file and store a new file (which can be placed in different directories ).
  • 2). Delete the empty block, canvas, and window provided by the template (blockname and detailblock ).

 

Step 3: Create a block, WindowCanvas, Lov

  • 1). Create a data block (we recommend that you manually add the block and rename it before using data block Wizard to create it)
    It can be the same as the table name, for example, xxpo_po_headers.
  • 2). Create a window and canvas. (We recommend that you manually add the canvas and rename it before creating it using layout wizard)
    It is recommended that the names of windows and canvas be the same as those of the corresponding block.
  • 3) Specify the window corresponding to the canvas to the window attribute of the canvas.
  • 4) Specify the corresponding content canvas for the primary canvas attribute of the window.
  • 5). Use date blockwizard to create a data block
  • 6). Use layoutwizard to create windows and canvas
  • 7). Create a New lov (we recommend that you manually add it, rename it, and then use the lov Wizard to create it)
  • 8). Apply subclass to all objects (item: Apply the items to be displayed on the canvas ).
  • 9) Create an indicator column and apply subclass: current_record_indicator.
  • 10) set the title attribute of the window to display the title in the upper-left corner of the window.

 

Step 4: Modify necessary attributes and code settings

  • 1) set the first navigation data block attribute of form to the first data block to be enabled.
    For example: xxpo_po_headers
  • 2). Modify in form trigger: PRE-FORM
    App_window.set_window_position ('<first_window>', 'First _ window ');

For example, app_window.set_window_position ('xxpo _ po_headers ', 'First _ window ');

  • 3) Modify close_window in program unit: app_custom.
    If (WND = '<first_window>') then
    App_window.close_first_window ;...
    For example, if (WND = 'xxpo_po_headers') then...

Step 5: open form in the systemUserSelect Organization

  • 1) determine the condition first: create four parameter:
    Chart_of_accounts_id (number)
    Org_name (char2 240)
    Org_code (char 30)
    Org_id (number)
  • 2). Add the trigger: PRE-FORM in Form
    Procedure: fnd_org.choose_org;
  • 3) Modify the title attribute of the window to the title displayed in the upper-left corner of the window:
    Add when-New-block-instancetrigger to the block
    For example, app_window.set_title ('xxpo _ po_headers ',: parameter.org _ Code );
  • 4) assign a value to organization_id:

Trigger: PRE-INSERT write in Block

For example: xxpo_po_headers.organization_id: =: parameter.org _ id;

 

Step 6: use sequenceFor TableUniqueidAssignment

  • 1). Trigger in Block: The PRE-INSERT writes the following program
    Example: Select xxpo_po_headers_s.nextval
    Into: xxpo_po_headers.xxpo_header_id
    From dual;

 

Step 7: Give created_by,Last_updated_byField assignment

  • There are two methods: frontend and backend.
  • 1). Front-end:
    In the pre-insert, PRE-UPDATE block trigger,:
    Fnd_standard.set_who.
  • 2). backend:
    Fnd_global.user_id is the creator or creator.

Step 8: Use calendar in the date column

    • 1) set the list of values of data field to enable_list_lamp.
    • 2) set the validate from list partition value of data field to No.
    • 3). In the KEY-LISTVAL item trigger (override) of data field, convert into calendar. show;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.