Home » Developer & Programmer » Forms » problem in search form (10g)
icon9.gif  problem in search form [message #459544] Sun, 06 June 2010 16:48 Go to next message
purelove
Messages: 32
Registered: May 2010
Location: bahrain
Member
hi all,,,

I have problem with this search form

that the first page it's running correctly,but the other pages it's not running correctly.
i try to move the datablock in first position "it's running correct" but the other data blockes which 're in the other posion,it's not running
what did u thing the problem is..?
why the position of the datablock it's matter.?

here my form i had attached;;


more info:
i'm using tab canvaus....

The Search Form
In search form, will contain 4 pages, each page display specific search:

*** each search will contains an LOV, search push button, clear push button, mainmenu push button.
page1:
By defining the title of the book, you can get such of information about that book.
The user will choose the title by selecting it form the LOV; I put a button "...." which contains WHEN-BUTTON-PRESSED TRIGGER:


BEGIN
GO_ITEM('book.title'); --this will be changed for indivdual search
LIST_VALUES;
END;

The search push button will contain WHEN-BUTTON-PRESSED TRIGGER:
begin
execute_query;
end;


The clear push button will contain WHEN-BUTTON-PRESSED TRIGGER:

begin
CLEAR_FORM;
GO_ITEM('title'); --this will be changed for indivdual search
enter_query;
end;


The mainmenu push button will contain WHEN-BUTTON-PRESSED TRIGGER:
BEGIN
CALL_FORM('C:\Documents and Settings\CS_ORACLE\Desktop\last_forms\MENU');
EXIT_FORM;
END;



please help me Sad,,,,,,
  • Attachment: search.fmb
    (Size: 1.11MB, Downloaded 1024 times)

[Updated on: Sun, 06 June 2010 17:49]

Report message to a moderator

Re: problem in search form [message #459572 is a reply to message #459544] Mon, 07 June 2010 03:19 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Telling us what you mean by not running correctly would be a good start.
Re: problem in search form [message #459648 is a reply to message #459572] Mon, 07 June 2010 14:18 Go to previous messageGo to next message
purelove
Messages: 32
Registered: May 2010
Location: bahrain
Member
not running correctly,i mean that ,when i run the form ,the first page it's running correctly,but the other pages it's not running!!!!
when i go to the fmb file and change the position of the datablock,and move the datablock of the second page at the first ,and then run the form,the second page it's working and the other pages not working!!!!!!!!!!!!!!!!! Sad please no time help me,i have to submit my project 2morrow Sad
Re: problem in search form [message #459658 is a reply to message #459648] Mon, 07 June 2010 15:40 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
4 tabs, you say. Do items on those pages belong to the same data block (I guess not). If these are different blocks, what is the connection between them (if any)? Is the "search" block data block or control block? Why should <Execute query> return anything useful (related to a value selected by a LoV)? Did you set ONETIME_WHERE (or DEFAULT_WHERE) block properties? Or did you set the search criteria in the PRE-QUERY trigger?
Re: problem in search form [message #459663 is a reply to message #459658] Mon, 07 June 2010 16:36 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I suspect the problem is that you go into enter-query mode on start up.
When you're in enter-query mode you can't navigate out of the current block.
And since you went into enter-query mode at start-up the current block will be the first block in the object navigator.

Your best bet, without having to redesign the whole form, is to add a WHEN-TAB-PAGE-CHANGED trigger that would do something like this:
IF :system.mode = 'ENTER-QUERY' THEN

  exit_form; --this takes you out of enter-query mode rather than actually exit the form.

  --navigate to the correct block
  IF :system.tab_new_page = 'CUSTOMER' THEN
    go_block('customer111');
  ELSIF <<you can fill the rest in yourself>>

  END IF;
  
  --go back into enter-query mode
  enter_query;

END IF;
Re: problem in search form [message #459666 is a reply to message #459663] Mon, 07 June 2010 17:33 Go to previous messageGo to next message
purelove
Messages: 32
Registered: May 2010
Location: bahrain
Member
thank you for replying cookiemonster


i made like what u said to me :
IF :system.mode = 'ENTER-QUERY' THEN
exit_form; --this takes you out of enter-query mode rather than actually exit the form.
--navigate to the correct block
IF :system.tab_new_page = 'CUSTOMER' THEN
go_block('customer111');
ELSIF :system.tab_new_page = 'PUBLISHER' THEN
go_block('V13');
ELSIF :system.tab_new_page = 'BOOK' THEN
go_block('BOOK');
ELSIF :system.tab_new_page = 'ORDERDELIVERED' THEN
go_block('V15');
END IF; --go back into enter-query mode
enter_query;
END IF;

it doesn't change anything!!!!! same problem Sad
Re: problem in search form [message #459667 is a reply to message #459666] Mon, 07 June 2010 17:45 Go to previous messageGo to next message
purelove
Messages: 32
Registered: May 2010
Location: bahrain
Member
thank you littlefoot for your reply
this is the answers about what u asked ::::

If these are different blocks, what is the connection between them (if any)?>>I don't want to be related to each other,each block do specific search,for example: book block,when the user choose from LOV the title of the book,the information which is related to that book,it displayed and so on for other blockes
Is the "search" block data block or control block? >> search block
Why should <Execute query> return anything useful (related to a value selected by a LoV)? i run all the blockes!! it return things!!but if the tab was at the first position!!! in my search form ,the book datablock is in the first tab ,so it's running correctly ,but other tabs 're not running!!,,but when i move the customer block in the first position,it work but other 're not working !!!!
Did you set ONETIME_WHERE (or DEFAULT_WHERE) block properties? Or did you set the search criteria in the PRE-QUERY trigger? NO

[Updated on: Mon, 07 June 2010 18:20]

Report message to a moderator

Re: problem in search form [message #459699 is a reply to message #459667] Tue, 08 June 2010 01:15 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I downloaded a form you attached; for some reason, I can't see PL/SQL program units (which Forms version did you use to create that form? My Forms 10g 9.0.4 can't edit it properly). Here's the screenshot (perhaps we'll discuss it easier when we see it); this is Tab 1 (the others are similar - they contain different items, but all of them contain buttons (every tab (i.e. datablock) has its own buttons).

/forum/fa/7887/0/

In order to make it work (that is, find what you are looking for), you should perform a query. These are the steps required to make it successful:
  • <Enter query>
  • enter search criteria (for example, a book title)
  • <Execute query>

There might be additional (sub)steps (such as opening a list of values, just like you do), but - basically - this is all you need. It means that, even if you do NOT use any of these buttons, search will work if you press the <Enter query>, enter an existing book title into the "Title" item and press <Execute query>.

Can you confirm that this is happening (for all tabs / blocks)? It MUST! Otherwise, buttons won't make it work either.


As of form buttons: a sequence in pushing those buttons makes a difference. Once again: first you have to enter the query mode. According to what you posted in the first message, you have to push
  • the CLEAR button first
  • "..." button next (to display list of values and select book title)
  • the SEARCH button
However: perhaps you should modify the CLEAR button and not CLEAR_FORM but CLEAR_BLOCK. I think that this is the main reason for your statement, saying that searhc works only if a tab is set to the first position. CLEAR_FORM (except that clears the form) puts the input focus in the first item of the first block.

Furthermore, it is (generally speaking) a good idea to navigate to an item using its full qualifications, which means BLOCK_NAME.ITEM_NAME. This is how the CLEAR button might look like:
clear_block;
go_item('book.title');
enter_query;


Your turn, now.
Re: problem in search form [message #459749 is a reply to message #459699] Tue, 08 June 2010 04:08 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Before we go any further can we please sort out what the problem is.
"not working" doesn't mean anything usefull. We know it's not working simply because you are posting here.
What we don't know is in what way it's not working. So can you please tell us:
1) What exactly you do on entering the form
2) What you expect to happen
3) What happens (or doesn't happen) instead of what you expect.

And can you also confirm whether or not your form is in enter-query mode at startup.
Re: problem in search form [message #459755 is a reply to message #459749] Tue, 08 June 2010 04:33 Go to previous messageGo to next message
purelove
Messages: 32
Registered: May 2010
Location: bahrain
Member
WHEN I RUN THE FORM,JUST TAB1 IT'S WORKING ,THEOTHER TAB ,WHEN I DEFINE THE lov,and press om search button,it does not bring any thing!!!!!,also when i go to tab3 !! it's bring me in tab 2!!!!!!!!
Re: problem in search form [message #459758 is a reply to message #459755] Tue, 08 June 2010 04:39 Go to previous messageGo to next message
purelove
Messages: 32
Registered: May 2010
Location: bahrain
Member
i changed the clear button!!

and i already make the things that u tell me !!

still the other pages(except the first page) it doesn't work!!!!
Re: problem in search form [message #459765 is a reply to message #459758] Tue, 08 June 2010 04:54 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
1) Stop posting in upper case.
2) Stop using lots of exclamation marks - it's not our fault your deadline is almost here.

What does this mean:
Quote:

WHEN I DEFINE THE lov


Re: problem in search form [message #459906 is a reply to message #459765] Wed, 09 June 2010 00:08 Go to previous message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Are you running your form on browser like IE?
Previous Topic: Webutil EXCEL download CLIENT_OLE2 stops when create obj
Next Topic: creating function
Goto Forum:
  


Current Time: Fri Sep 20 00:34:28 CDT 2024