problem in search form [message #459544] |
Sun, 06 June 2010 16:48 |
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 ,,,,,,
-
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 #459663 is a reply to message #459658] |
Mon, 07 June 2010 16:36 |
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 #459667 is a reply to message #459666] |
Mon, 07 June 2010 17:45 |
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 |
|
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).
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 |
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 |
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 #459765 is a reply to message #459758] |
Tue, 08 June 2010 04:54 |
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
|
|
|
|