Example is given below to validate a Text Item in Oracle Forms with specific rules condition which can be define at run time with the use of T-List item and When-Validate-Item trigger.   Below is the screen shot of this example form which can be down…
SYSTEM.CURSOR_BLOCK Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system variable. The value that the SYSTEM.CURSOR_BLOCK system variable represents depends on the current navigation unit:If the current navigation unit is the bl…
Highlight a Text Item in Oracle Forms With Visual Attribute It is very necessary to highlight the current cursor text item in data entry forms so that a user can easily notice the current item. Steps to highlight current item 1.   Create a visual att…
Below is the example to write file on client in Oracle Forms 10g with webutil library package.Note:  Webutil library must be attached to the form.DECLAREv_dir VARCHAR2(250) := 'c:\temp';ft_tempfile CLIENT_TEXT_IO.FILE_TYPE;beginft_tempfile := CLIENT_…
Suppose you have two T-List items in form and you want  to shift element values from one list to another in Oracle Forms, here is the example given below for the same. Create two buttons also between list items as shown in picture in the bottom of th…
Example is given below to Populate a List Item in Oracle Forms using Create_Group_From_Query , Populate_List and Populate_Group command. In this example you can specify the query at run time to populate the list item with that query result.   Followi…
You want to add a value in Combo List item in Oracle Forms, by typing it in combo list box text area. Here is the example is given for the same, you can write following block in When-Validate-Item trigger for the combo box item: Write the following c…
You can do Select, Cut, Copy and Paste operations on text items in Oracle Forms using Select_All, Cut_Region, Copy_Region and Paste_Region commands through right click popup menu.   In this example I created a popup menu which is associated with the…
Check the following 8 Links for best Oracle Forms examples with source code (Fmb files), which will work in any version of Oracle Forms. The examples are given for "Oracle Form's Triggers", "Hierarchical Trees", "Stacked Canvases&…
Change the font size and weight of text items and push buttons on mouse hover in Oracle Forms.   An example is given below to highlight the text in text items and highlight the label of a push button item at run time whenever mouse enters or leave, b…
Add combo list / drop down list item element at runtime in Oracle forms.SyntaxPROCEDURE ADD_LIST_ELEMENT(list_name VARCHAR2,list_index, NUMBERlist_label VARCHAR2,list_value NUMBER);ExampleDeclare  nElmntCount Number;Begin   -- First count the total l…
The below plsql program unit could be used in a WHEN-NEW-FORM-INSTANCE trigger to initially populate the hierarchical tree with data in Oracle forms.DECLAREhtree ITEM;v_ignore NUMBER;rg_emps RECORDGROUP;BEGIN-- Find the tree itself.htree := Find_Item…
The example given below for writing text file or CSV using Text_IO package from a tabular block in Oracle Forms.   Suppose there is a tabular grid data block "Job_History" in your forms and you want to write a CSV on click of a button by reading…
Set_Item_Property is used to change an object's settings at run time. Note that in some cases you can get but not set certain object properties. The following are Syntax of Set_Item_property command:SET_ITEM_PROPERTY(item_id ITEM,property NUMBER,valu…
An example is given below to how to create a modal dialog window in Oracle Forms for asking user input and return the value to any text item.   The following is the screen shot of this demo and this form could be downloaded from the following link: C…
Oracle Forms is having its default records filter, which we can use through Enter Query mode to specify some search criteria or to filter records before display, but you can also create your own filter, which can be more user friendly and easy to use…
Below is the example plsql unit to validate login credentials and after successful validation open a new form by passing some parameters to it, in Oracle forms 10g.Create a form for custom login. Create text items for username and password etc. and a…
See also: Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle FormsPre-Update Fires during the Post and CommitTransactions process, before a row is updated in Oracle Forms. It fires once for each record that is marked for update.The foll…
Example is given for Pre-Query and Post-Query triggers in Oracle Forms, with using Display_Itembuilt-in in Post-Query triggers to highlight fields dynamically.   This is the screen shot below for this example:   You can also download this form from t…
Whenever we commit after entering data in Oracle Forms, many triggers fires during this event and also Pre-Update and Pre-Insert triggers fires just before inserting or updating the record into table. We can write Pre-Update and Pre-Insert triggers o…
Play_sound is used to play audio files in Oracle Forms, Play_Sound plays the sound object in the specified sound item.PLAY_SOUND examplesThe following plsql block you can write in when-button-pressed trigger for a push button item, when button clicke…
Get_File_Name is built-in function of Oracle Forms 6i, used to get the file name with address by browsing the file. You can browse a specific extension name file or with multiple extensions using wild cards.   In this example I am showing three diffe…
Run_Product is used to run Oracle Reports (RDF/REP files) in Oracle Forms. It invokes one of the supported Oracle tools products and specifies the name of the module or module to be run. If the called product is unavailable at the time of the call, F…
ID_NULL built in function is used to determine that an object type variable is null or not null in Oracle Forms and returns a BOOLEAN value that indicates whether the object ID is available or not means it is null or not null. Below is the Syntax of…
Suppose you want to change multiple images after a specified time in home screen of your oracle forms application. Follow these simple steps to create image presentation with create_timer: (1) Place an image item on canvas and set the appropriate siz…
I have written many posts previously on Timers in Oracle Forms like how to change images randomly with timers and how to display a clock using timer, but in this post I am simply describing to how to create a timer, stop a timer, re-start a timer and…
Set Icon_File property in When-Mouse-Enter trigger Suppose you are creating icon based menu system in Oracle Forms 6i and you want to change icon when mouse over on any push button. You can accomplish this task by writing form level trigger when-mous…
Below is the example to create an excel file in Oracle Forms.Pass the Sql query string to the below procedure to generate an Excel file using Ole2 package.PROCEDURE Create_Excel_File (CSQL Varchar2)Is   source_cursor    Integer;   l_colCnt         Nu…
Below is the some useful commands of Ole2 to format excel file in Oracle Forms.-- Change font size and name in ole2-- Declare as cfont ole2.obj_type;CFONT := OLE2.GET_OBJ_PROPERTY(CELL, 'Font');OLE2.SET_PROPERTY(CFONT, 'Name','Calibri');       OLE2.S…
Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to control data block records. In this form whenever user selects any node in tree menu then corresponding record is displayed at right side.   This form i…