Home » Developer & Programmer » Forms » How to make Query Mode work on Forms (Oracle Apps 12i)
How to make Query Mode work on Forms [message #549586] Mon, 02 April 2012 01:08 Go to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Hi Guys,

I have created a custom form. I have field called Order No. When i query on Order no..i shld be able to pick order no as well as other fields related to it. Please let me know how do i acheive this functionality. I mean the f11 and ctrl f11 querying functionality.
Re: How to make Query Mode work on Forms [message #549589 is a reply to message #549586] Mon, 02 April 2012 01:29 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Didn't we discuss that already? How is this problem different from the previous one?
Re: How to make Query Mode work on Forms [message #549594 is a reply to message #549589] Mon, 02 April 2012 03:09 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Hi LF,

No we didn't discuss that already.
The one already discussed was executing in tabular block. Now my req is When i query on a particular item , it should display all the related details asscoiated with that record, in form block.

My Oracle form has 2 block one is form and tabular. Now I am asking your suggestion on Form block.

Thanks
Re: How to make Query Mode work on Forms [message #549595 is a reply to message #549594] Mon, 02 April 2012 03:14 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The principle is EXACTLY the same, no difference at all. The only "difference" is a form layout (tabular vs. form).

So: create a block based on a table, make its layout a "form". Run the form, enter query mode. Enter "Order No." value into the corresponding item. Push <Execute query> button on the toolbar. That's all.

It would be different if order's details don't belong to the same table - then you should create non-database items and write a POST-QUERY trigger which would actually SELECT all those values from different tables, such as
select order_name 
  into :block.order_name
  from order_names
  where order_no = :block.order_no;

select order_date
  into :block.order_date
  from order_dates
  where order_no = :block.order_no;

In such a case, default querying mechanism wouldn't be used.
Re: How to make Query Mode work on Forms [message #549596 is a reply to message #549595] Mon, 02 April 2012 03:22 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
My problem is am not able to enter into query mode.When i click on F11. It never enter's query mode. Please guide me.
Re: How to make Query Mode work on Forms [message #549597 is a reply to message #549596] Mon, 02 April 2012 03:25 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is the datablock based on a database table?
Re: How to make Query Mode work on Forms [message #549598 is a reply to message #549597] Mon, 02 April 2012 03:32 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
yes it is...
Re: How to make Query Mode work on Forms [message #549599 is a reply to message #549598] Mon, 02 April 2012 03:38 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
What are the following datablock properties set to:
Database Data Block
Query Allowed
Query Data Source Type
Query Data Source Name

Are you using the default forms toolbar or have you created your own enter-query button?
Re: How to make Query Mode work on Forms [message #549600 is a reply to message #549599] Mon, 02 April 2012 03:50 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Query Allowed : Yes
Query data source Type : Table
Query data source name : block name (e.g block_name)

Am using default forms tool bar

Let me know if you need more details.

Thx
Re: How to make Query Mode work on Forms [message #549601 is a reply to message #549600] Mon, 02 April 2012 03:57 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is the cursor in the block when you press F11?
Re: How to make Query Mode work on Forms [message #549602 is a reply to message #549601] Mon, 02 April 2012 04:07 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Yes it is keep blinking.

Other properties of the block as below. Might be usefull for you to help me
Query Array size: 0
No of records buffered: 0
No of records displayed : 1
Query all records : No
Rec Oreination : Vertical
Single record : No


DATABASE
database data block : No
Enforce Primary Key : No
Query allowed: yes

Re: How to make Query Mode work on Forms [message #549604 is a reply to message #549602] Mon, 02 April 2012 04:16 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
DATABASE
database data block : No

So what do you expect?




Cookiemonster asked: Is the datablock based on a database table?

You replied: yes it is...

[Updated on: Mon, 02 April 2012 04:17]

Report message to a moderator

Re: How to make Query Mode work on Forms [message #549605 is a reply to message #549602] Mon, 02 April 2012 04:18 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
cookiemonster wrote on Mon, 02 April 2012 09:25
Is the datablock based on a database table?

maggy_ashee wrote on Mon, 02 April 2012 09:32
yes it is...

maggy_ashee wrote on Mon, 02 April 2012 10:07

database data block : No


What do you think database data block does?
It tells forms the datablock is based on a database object.
You've told forms that block isn't based on a database object.
So why would it go into enter-query mode?

Set that property to yes.
Re: How to make Query Mode work on Forms [message #549607 is a reply to message #549605] Mon, 02 April 2012 04:28 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
yes i have set it to yes now... now am getting into query mode i believe... but with a white background. How do i change it to blue..as it will be in seeded forms.
Re: How to make Query Mode work on Forms [message #549608 is a reply to message #549607] Mon, 02 April 2012 04:30 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Background of what exactly?
Re: How to make Query Mode work on Forms [message #549610 is a reply to message #549608] Mon, 02 April 2012 04:35 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Background of Item.
Re: How to make Query Mode work on Forms [message #549612 is a reply to message #549610] Mon, 02 April 2012 04:37 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Which item?
Re: How to make Query Mode work on Forms [message #549613 is a reply to message #549610] Mon, 02 April 2012 04:37 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
When i click on Order number field and click F11, that field to be in blue and i shld be able to enter order number and when i click on ctrl F11. result to be displayed.

Re: How to make Query Mode work on Forms [message #549616 is a reply to message #549613] Mon, 02 April 2012 04:50 Go to previous message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
You'll want to set the visual attribute using set_item_property.
If you have other forms that do that I suggest you see how they do it and copy them.
Previous Topic: installing Oracle forms ver.11g + Weblogic 12c
Next Topic: Cannot open file
Goto Forum:
  


Current Time: Fri Jul 05 23:48:30 CDT 2024