• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1982
  • Last Modified:

how to develop an available query froms

I want to develop an Available query forms,it support many tables with parameters, and Only need to post one parameter(datablock) .
I design it like this (but it's pity the window diagram model can't put here) the canvas includes two droplist,one for field the other for compare, a text,a text list and three button(add,delete,ok)I want it perform the following task:
1. select the fields name from the droplist ‘field’. The field name comes from the datablock(pass by paramenter)
2. select compare sign from the droplist ‘compare’.
3. input the condition in the ‘result’
4. select “and” or “or” conn sign
WHEN u press the ‘add’ button one record input above will add to the text list. When u press ‘delete’ button a selected record will be deleted from the text tlist. When u press ‘ok’ button it will return a :global.where_clause expression..

The following is a procedure invoke the query forms :
Procedure invoke_query(block_name varchar2) is
Where_clause ,ls_old_sql varchar2(200);
open_forms(query_forms,block_name);//invoke the query forms return :global.where_clause
Where_clause:=add_where_condition(where_clause);//invoke my own function
If :system.cursor_record=0 then
Message(“no record found”)
End if;

pls give me a answer
best regard!
  • 2
  • 2
  • 2
1 Solution
Personally, I do not understand what are you asking for.
Since there aren't any answers (to yout post) yet, I think nobody else is getting what you want.
zhangruiAuthor Commented:
     my question is how can i get the field name, field type,field display name from the pass paramenter(data block).
If you have datablock name as parameter, you can use
Get_Block_Property('BLOCKNAME', First_Item) to get the name of the first item in the block.
Get_Item_Property('BLOCKNAME.ITEMNAME', NextItem)
will return the name of the next item in the block, etc.
Get_Item_Property('BLOCKNAME.ITEMNAME', Item_Type) returns the type, etc.
Open the online help to look for more properties delivered by Get_Item_Property() built-in function
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Mark GeerlingsDatabase AdministratorCommented:
If I understand your question correctly, you would like to design an Oracle Form with just one block that can dynamically select from any table, and dynamically select just the columns the user wants at the time.  That may be possible in Oracle Forms, but it certainly is not the way that most people use Oracle Forms.  It also may not be easy, and may cause performance problems, since almost every query will then be different.  This will prevent the Oracle server from being able to re-use SQL statements.

Is this what you are trying to do: design a flexible Oracle Form that can dynamically adjust to select from any table?
zhangruiAuthor Commented:
   That's it.U understand my mean very well.But I don't perform it well.It's only  a design schema(frame) of mine. Give me a hand pls!
Mark GeerlingsDatabase AdministratorCommented:
I do not recommend that approach: a single form that can be changed dynamically at runtime to select from any table, and to optionally select different columns.

I recommend creating a separate form (or at least a separate block) for each table, and choosing the columns that will displayed for each table when the form is designed.  That is the way that most people use Oracle Forms.

Whether you have a separate form for each table, or you have some multi-block forms, that is a design question that will vary with each application.  In some applications it makes sense to have master-detail (or master-detail-detail, etc.) forms that have multiple, related blocks each for a different table.  Oracle Forms handles these very well.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now