Home » Developer & Programmer » Forms » query mode (forms6i)
query mode [message #514868] Thu, 07 July 2011 01:53 Go to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

hi,

I want to search values with F11.for example i will enter some value and i will press F11.it should be display that record. how can we do this? That block is populating values from code.

[Updated on: Thu, 07 July 2011 01:59]

Report message to a moderator

Re: query mode [message #514869 is a reply to message #514868] Thu, 07 July 2011 01:57 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Issue ENTER_QUERY.
Re: query mode [message #515007 is a reply to message #514869] Thu, 07 July 2011 13:00 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

Hi,

In the line level block populating some records based on push button(when button pressed trigger plsql code) in the header level.But i need to put that line block into query mode(F11 & CTRL+F11)? how can i do this?
Re: query mode [message #515013 is a reply to message #515007] Thu, 07 July 2011 13:41 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I assume the line level block is a non-database block?
If so you can't put it into enter-query mode - that only works on database blocks.
Re: query mode [message #515084 is a reply to message #515013] Fri, 08 July 2011 01:34 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Text that is now written in the first message is different from the original one. It was (don't remember exactly) "how to programatically enter query mode" or something like that.
I'm not sure how that happened (as the message was updated two minutes AFTER I answered it. I thought that - once the message is answered - it is impossible to modify it. Will have to ask Frank Naude).

Anyway: OP
for example i will enter some value and i will press F11.it should be display that record

It doesn't work that way. First you enter query mode, then you enter some value and - finally - execute query.

However, if it is a control block, default querying system won't work (as Cookiemonster already said) so you'll have to find a different approach. (By the way, why is it not a database block?)
Re: query mode [message #515212 is a reply to message #515084] Fri, 08 July 2011 11:26 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

Actually my form look like header and lines.In header level all are control items and created one push button in this level.If we click that push button line level values will be populated here i have written some code and applied some conditions as per user requirement.line level block is created on data base table and here i have changed data base item as NO.so it is control block and 6 column are there in line level.3 are mandatory columns.here user wants to query with some item then it should be populate that line item details.
As u guys said query mode works on database block only.but is there any alternative?because we have 1000 lines are there that time user wants to find out 700 line.how?can i put like find button and put some code on that?
Re: query mode [message #515247 is a reply to message #515212] Sat, 09 July 2011 04:54 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I must be quite stupid because I still don't understand what you are trying to do. Could you post a screenshot?

This is what I understood, so far:
  • there are two blocks in your form
  • the first block (you call it a "header" one - I prefer "master") is a control block, which means that it is not based on a table
  • the second block (you call it a "line level" block - I prefer "detail") is a database block - at least, that's what you said: Quote:
    line level block is created on data base table

  • this is how it works: you enter some values into master block items. Then you push the "FIND" button. The result should be displayed in the detail block, i.e. display all records from a table that satisfy condition entered into the master block.
  • it means that you have a few options to do that:
    • one is to - in WHEN-BUTTON-PRESSED trigger - use SET_BLOCK_PROPERTY and set detail block's ONETIME_WHERE property so that it looks like a WHERE clause in SELECT statement. It would ensure that only desired records are fetched
    • or, in PRE-QUERY detail block trigger, set search criteria as
      :detail.id := :master.id;
      :detail.name := :master.name;
      etc.

    WHEN-BUTTON-PRESSED on the "FIND" button should - somewhere at the end of the code - contain
    GO_BLOCK('detail');
    EXECUTE_QUERY;
Now, I might be very wrong, but the above *should* be OK (at least, I hope so). If not, perhaps someone else got the point and will be able to assist - I'm out of ideas (and still wonder why you guys reinvent the wheel, when the querying functionality is built-in into Forms, and - if you do it as expected - Forms will do all of the dirty job for you. All you need to do is to make the form fancy, because it works by default).
Previous Topic: update table data via oracle forms 10g
Next Topic: Record groups
Goto Forum:
  


Current Time: Mon Sep 16 12:30:05 CDT 2024