Saturday, August 29, 2015

Oracle Form Visual Attribute Usages

In the name of Allah, Most Gracious, Most Merciful      
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,

The term “Graphical user interface” (GUI) is also known as Human-Computer Interaction (HCI). HCI cares about the details of maintaining the relation between a computer user and an application system. With respect to, how application users interact with the application system and to what extend application system are developed to facilitate the interaction process between a computer and a human being.

At the first glance, a well-designed GUI definitely influences on a customer's eye-appealing. Oracle form offers 'Visual Attribute' to predetermine your form visual interface. Visual attributes are the font characteristics 
. Font e.g. it's Size, Style, Width, Weight
 Color and pattern characteristics e.g. Foreground Color, Background Color, Fill Pattern, White on 

You can create "Visual attributes" either for a form module or a menu module in your 

system application.

"Visual attributes" can also control a meaningful or a logical notation in your application that the user has to consider.

e.g. Giving a large font for titles has to be set in a different font style or in a large font size than the one commonly used for a user inputs e.g. in a text box.

 The sense of choosing colors is also an important aspect that can help you giving  the user the impression that implies a meaningful sign that  directs him to input data in a proper manner during the use of your  application system.

e.g.Giving a red background can reflect the impression that this form item is mandatory and can't save his input data into the database without filling it up. 

ask Definition:T
  Create & use a visual attribute.

Task Solution

7 Steps To Highlight Current record:

1.     Select a visual attribute node.
2.      Click on the green (+) sign to create a new visual attribute
3.     Name a visual attribute it e.g. VA_CUR_RECORD
4.      Invoke the visual attribute's property palette & set a background color.
5.      Invoke the data block's property palette.
6.     Assign 'VA_CUR_RECORD' to Current Record visual attribute property.
7.     Compile, generate, save and run the form.

Let's assume we have created and set a visual attribute named 'VA_NAME'. Now, all we need is to recognize how we can use it.
Pls. follow and apply such useful code samples:

·        Set an item background color for all records:


·        Set an item background color for one record:


·        Set background color for the current cursor record:


·        Set an item prompt font to bold for all records:


·        Set an item prompt font to normal  for all records:


Working under stress more often leads to run-time errors, poor or an average level of (GUI), etc. On the other hand, paying more attention to the details of every step in system life cycle helps in delivering a successful working application with a friendly user interface. You can enjoy learning and applying such techniques to contribute in building a well-designed GUI.

Learn more about:

·        Create a Dynamic List Item

Hope this helps…

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.

Friday, August 14, 2015

Oracle Form Wizard Simulation



In the name of Allah, Most Gracious, Most Merciful      
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,
        Every minute in a developer working day, is an opportunity to invest his/her time and technical skills. On the other hand, if such a system application you are working on is not well analyzed and designed with the client's final approval in the contract, then, you should expect an endless series of a client's demand that will surprise you. This will defiantly affect negatively on the predetermined delivery dead time of your system application.

  Today we will demonstrate one of the uncommon tasks that a client may ask you. If you did not perform such a task before, it's quite relevant to think positively. The first thing you must believe in is that 'Allah' will assist you. Accordingly, you will really be inspired to decompose such a task into smaller logical pieces. Moreover, some work around technically can be applied to perform your project task efficiently and properly.

Create an Oracle Form Wizard. Definition: Task  

Task Solution idea

     Although there is no control in Oracle form builder tool palette on the left side of the canvas layout called 'Wizard' the same as 'Tree' but "Yes" in Shaa Allah we can accomplish the task.

Some Guide lines to build a form wizard

·        A wizard consists of a number of related canvases having form items.
·        Navigation between canvases is through creating buttons, e.g. 'Next', 'Previous' and 'Cancel'.
·        Create the database blocks and specify each to a specific canvas.  

Task Solution

Now, let's implement a form wizard manually as follow:

·        Create one content canvas and as many stacked canvases as you need.
·        Create your own database blocks.
·        Specify each block to a specific stacked canvas.
 ·        Create the navigation button, e.g. 'Next', 'Previous' and 'Cancel'.
·        Hence, the whole form wizard's idea relies on connecting all the stacked canvas to each other with the following code in e.g. 'Next' button using WHEN-BUTTON-PRESSED Trigger.

Next button does Dual Tasks:
Task 1: calls the next logical, sequential canvas in a form wizard in the same pattern of the user's manual task


If there is more than one data block you have to use the following built-in


If there is at least one data block you have to use the following built-in.

The following destination item MUST BE visible and navigable

GO_ITEM ('Item_Name');

Next button as mentioned, it does Dual Tasks:
Task 2: It Hides the Previous logical, sequential canvas in a form wizard that the user has already filled in.

 -- Hide the original current canvas in


The same logic of the above code can be applied to other Wizard navigation buttons as 'Previous' and 'Cancel'. Only just a few changes you have to modify as renaming the canvas name, block name and item name.
Definitely, you will need to add more logic to your code to control the client's data entry to enhance the form's application functionality.

El-Hamdu Lellah'; Thanks to Allah, my suggested workaround project task solution 

  works successfully at OTN forum  Thus, i recommend you to give it a try ...

By the time you will find out that there were different solutions to any problem, but it was invisible or unknown to you. In fact, a developer' job reminds me with the old proverb that says "You cannot direct the wind, but you can adjust the sail".
Finally, remember you have to be beneficial to others and leave a good sign in others life to pray to you.

Learn more about:

·        Create a Dynamic List Item

Hope this helps…

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.

Wednesday, August 12, 2015

A Simple Oracle Query Form

In the name of Allah, Most Gracious, Most Merciful      
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,

 First step in applying for a new Oracle Developer is not an easy step. Since applying for this job needs you not only to be familiar with the whole track courses, but technically it needs you to be familiar with what makes the work goes forward.

Today, I am going to explain you one of the most common tasks that you should be acquainted with before applying for a new job.

 Furthermore, you should never miss the query form enhancements i added at the end of this article. It simply facilitates the user input in re-query different criteria.

ask Definition:   T

    Create A Simple Query Form Manually.

Task Solution idea

Initially, we all had learned from Oracle documentations, tutorials, or even at educational centers from the very beginning steps how to query data from the database into an Oracle form as follows:

·        In Web-based forms the user press CTRL+F11 function key to retrieve all data from the database.
·        Or press the F11 function key to filter data in Enter Query mode. Then, Press the CTRL+F11 function key to execute the query.

 But today we will learn how to customize a query form in more useful and practical way. The idea of the task solution is based on:

·        Create one master control block with ' Lov' for a search criteria input.
Note: A control block is a block that is not associated with any database table. Items in a control block do not, by default, relate to any database columns.
·        Create a muti-record detail database block.
·        Create a relation between the two previous blocks.

Task Solution

1.     Create a master control block (database= yes) to accept retrieving data from the detail block. Hence, no data source specified in control block property.

2.     Create two List of Value ' Lov'  for two non database item e.g. Semester_Year  and Class_Id; these two text item will copy the value entered or selected from ' Lov'  to the detail block.

3.      Create a detail data block:
o   You must select both Semester_Year  and  Class_Id with other related table items.
o   It is also recommended to make both Semester_Year and Class_Id for the detail block invisible.

4.     Create a relationship between the two blocks with having e.g. Semester_Year and Class_Id (will do the job of Copy Value from Item property) for filtration of data.

5.     Create a PRE-QUERY trigger in the detail data block :
The following code will help to pro-grammatically filter the retrieved data from the related database.
'Semester_Year = ' ||:FIRST_BLOCK_NAME.Semester_Year || ' AND Class_Id = ' ||:FIRST_BLOCK_NAME.Class_Id); 

6.     Change the Master's block property:
 Navigation Style > Change Data Block.

7.     Create a WHEN-NEW-BLOCK-INSTANCE trigger in the detail data block

Query Form Enhancement    

Now it's time to add some enhancement to your form to avoid an expected issue you will face on re-querying other search criteria...
When a set of record displayed in the detail block, the user will definitely need to choose another value once again from LOV existed in Master block. Consequently, the relationship between the control block and the detail block will not work since copy value from item will not change and the old set of records will keep appearing in the detail block.

At Header Block create WHEN-NEW-BLOCK-INSTANCE Trigger and paste the following sequential built-ins:




All you have to do is to rename the form blocks upon yours.

Remember, criticizing your failure and work by all the means to pass through the barriers is a self building esteem to your career path. The profound desire to solve problems and learn new development techniques is really a good sign of an experienced developer you will find later in yourself.  

    Learn more about:

Hope this helps…

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.