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.

Following is the screen shot for this example


You can also download this Oracle Form fmb from Google Drive with the following link Listitem.fmb

The following is the code written on the "Populate List With The Above Query" button:

DECLARE
   rg_name   VARCHAR2 (40) := 'DYNGRP';
   rg_id     RecordGroup;
   errcode   NUMBER;
BEGIN
   /*
   ** Make sure group doesn't already exist
   */
   rg_id := FIND_GROUP (rg_name);

   /*
   ** If it exists then delete it first then re-create it.
   */
   if not id_null(rg_id) then
     delete_group(rg_id);
   end if;

      rg_id :=
         CREATE_GROUP_FROM_QUERY (
            rg_name, :txtqry);
   /*
   ** Populate the record group
   */
   errcode := POPULATE_GROUP (rg_id);
     clear_list('OLIST');
     populate_list('OLIST', 'DYNGRP');
END;

There is an inbuilt game in Google Chrome browser, which can be played when you are offline means your internet connection is not working. To play game you have to PRESS THE SPACEBAR to active it.

Suppose you are trying to open an URL / website and you got below shown message:


If you see above message then press SPACEBAR and it will start the game like shown below:


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 download free from Google Drive with the following link: Validate.fmb


The following trigger is written in the When Validate Item trigger:

if :rules = 'Must Not Be Blank' then
if nvl(:wvi,'-_-') = '-_-' then
  bell;
  Message(:rules);
  raise form_trigger_failure;
end if;
elsif :rules = 'Can Be Blank But Can Not Have Numeric Value' then
if length(replace(translate(:wvi, '0123456789', '          '), ' ')) < length(:wvi) then
 bell;
 Message(:rules);
    raise form_trigger_failure;
end if;
elsif :rules = 'Must Contain @' then
if not instr(:wvi, '@') > 0 then
 bell;
 Message(:rules);
     raise form_trigger_failure;
end if;
elsif :rules = 'Must Contain Date Only' then
declare
d date;
Begin
  d := to_date(:wvi, 'DD-MM-YYYY');
exception
when others then
   bell;
   Message(:rules);
   raise form_trigger_failure;
end;
end if;

Example is given below to fetch any Oracle objects DDL script using DBMS_Metadata.Get_DDL command in Oracle Forms using Forms_DDL command.

You can download this form for free including source code with following link from Google Drive Dbms_Utility.fmb

You may need to create a table in current schema/user by which you are logging with and below is the script for this:

Create Table DDL_Script (ddl varchar2(1000));

I will add further more tabs related to Dbms utility tasks to this form and will share also.


Following is the code written in Show DDL push button:
DECLARE
   v        VARCHAR2 (4000);
   objtpe   VARCHAR2 (100);
BEGIN
   --    v := dbms_metadata.get_ddl('TABLE', :objname, user);
   SELECT object_type
     INTO objtpe
     FROM user_objects
    WHERE object_name = :objname;

   :objtype := objtpe;

   FORMS_DDL ('drop table ddl_script');
   FORMS_DDL(   'create table ddl_script as select dbms_metadata.get_ddl('
             || CHR (39)
             || objtpe
             || CHR (39)
             || ','
             || CHR (39)
             || :objname
             || CHR (39)
             || ', user) ddl from dual');

   IF FORM_SUCCESS
   THEN
      SELECT ddl
        INTO :ddltxt
        FROM ddl_script
       WHERE ROWNUM = 1;
   ELSE
      :statbar := 'Message: Object does not exists.';
      FORMS_DDL ('create table ddl_script (ddl varchar2(1000))');
   END IF;
END;

Following is the code written in When-new-form-instance trigger:

set_window_property(forms_mdi_window, window_state, maximize);

DECLARE
   rg_list_id   RECORDGROUP;
   rg_name      VARCHAR2 (20) := 'OBJECTTYPES';
   ret_code     NUMBER;
   --The following holds a SELECT query from which the list elements are derived.
   v_select     VARCHAR2 (300);
BEGIN
   BEGIN
      FORMS_DDL ('drop table ddl_script');
   EXCEPTION
      WHEN OTHERS
      THEN
         NULL;
   END;

   BEGIN
      FORMS_DDL ('create table ddl_script (ddl varchar2(1000))');
   EXCEPTION
      WHEN OTHERS
      THEN
         NULL;
   END;

   ret_code := POPULATE_GROUP ('OBJECTNAMES');
   POPULATE_LIST ('OBJNAME', 'OBJECTNAMES');
END;

You can find the record group details itself in form which I am sharing with this post.

You are working in SQL editor of TOAD and writing a large query or program and suddenly Toad hangs due some abnormal execution or other reason and you have not saved your work then it is a bit worry situation because you want to save your huge query or program in which you was working.

If this happen then don't worry just kill that session of TOAD and restart the toad and most likely Toad will prompt you to recover your most recent SQL editor file by displaying following window:


But if Toad does not display this window or you skipped then you recall this window by using following steps:

1. Go to File menu and click on the Recover Documents... option as shown below:

2. Then select your SQL editor file in which you recently worked, that's all.

You can now discover the breakthrough innovations in Oracle Database 12c going to happen in 2015, as Oracle Corporation released a free eBook on Oracle Cloud Database 12c. Innovations like Oracle Database In Memory, Deliver Database as a Service etc.

You can download this free eBook directly from Oracle using the following link https://go.oracle.com/LP=6501/?elqCampaignId=14846&src1=SO:FB:OrD:&src2=FacebookDatabase

The ebook is containing the following chapters with video links for more details:

Table of Contents
Chapter 1: Innovation
Chapter 2: Powering the Real-Time Enterprise
Chapter 3: Database Consolidation
Chapter 4: Database Storage Optimization
Chapter 5: Defense-in-Depth Security
Chapter 6: Maximum Availability
Chapter 7: Data Warehousing and Big Data
Chapter 8: Rapid Time to Value
Chapter 9: Database Management
Chapter 10: Hardware and Software Engineered Together

Chapter 11: Conclusion


Created XO Checker game in Oracle Forms and sharing its FMB (source code) for reference so that you can view its code written on the objects.

You will learn a lot by looking its code and logic, you can download this form for free from Google drive with the following link:


Please leave a comment on this post if you have any questions.


I already posted about my Hospital Management Software based on Oracle Forms and now I am giving an option to users to buy its OPD and IPD Registration part with billing system, I extracted a part of this software so that users can buy easily in low price and if they satisfied then they can buy the whole software. This OPD & IPD registration and billing software can be used in Hospitals, nursing homes etc. to maintain OPD (Outdoor patient registration) and IPD (Indoor patient registration) records and their billing information. The price of the software is USD $5 only.

You can download this project with the following link HMS Project

A installation guide readme.txt file and forms related files and database dump are available in this project.
Buy now

If you are buyer from India then you can use the following link to pay Buy Now

File Hospital.fmb is containing the following:




Overall the project is containing following files:


Screen shots of this project:




V. Kapoor

{picture#https://3.bp.blogspot.com/-q3wCssWUHo8/ViDFfCpPEuI/AAAAAAAAD0M/MHPvgnl3T3U/s1600/authpic.JPG} Vinish Kapoor is a Software Consultant, currently working in a reputed IT company in Noida, India and doing blogging on Oracle Forms, SQL and PLSQL topics. He is an author of an eBook Oracle Forms Recipes, which is available on Google play. {facebook#https://www.facebook.com/foxinfotech2014} {twitter#https://twitter.com/foxinfotech} {google#https://plus.google.com/u/0/+VKapoor/posts}
Fox Infotech. Powered by Blogger.