Problem with 2 LOV's [message #340161] |
Mon, 11 August 2008 13:07 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Kurtn1986
Messages: 5 Registered: August 2008 Location: Belgium, Europe
|
Junior Member |
|
|
Hello,
I new to Oracle Forms Builder. I've got Developer suite 10G.
I've got 2 blocks: (relation is master-detail with ccode)
1. COMPANY-->Form
CCODE (NUMBER) (contains LOV_C)
CNAME (VARCHAR2)
PB_LIST_COMPANIES (button)
2. PROJECT--> Form
PROJCODE (NUMBER) (contains LOV_P)
CCODE (NUMBER)
PROJTITLE (VARCHAR2)
PB_LIST_PROJECTS (button)
And 2 LOV's
1. LOV_C
After pushing PB_LIST_COMPANIES-button a LOV(contains: Company.ccode & Company.name) appears and returns the value of company.ccode to the item CCODE in the Company-block. The query is executed. (This works well)
2. LOV_P
After pushing the PB_LIST_PROJECTS a LOV(contains: project.projcode & project.title) appears and returns the value of project.projcode to the item PROJCODE in the Project-block and then
Now this is the problem
If I run the form and want to enter a query by pressing the PB_LIST_PROJECTS-button, it just fills in the item PROJCODE of the PROJECT-block. How can I populate the whole project-block and also the company-block and replace the cursor in CCODE of company?
Thx for helping me out!
|
|
|
|
Re: Problem with 2 LOV's [message #340320 is a reply to message #340170] |
Tue, 12 August 2008 05:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Kurtn1986
Messages: 5 Registered: August 2008 Location: Belgium, Europe
|
Junior Member |
|
|
Yes, u'r right. But when i press on the enter-query button and then on the PB_LIST_PROJECTS-button. The form always navigates to the item CCODE in the COMPANY-block.
The problem is now: when I press enter-query, I should have the possibility to use the LOV_C by pressing the PB_LIST_COMPANIES in the COMPANY-block OR to use the LOV_P by pushing the PB_LIST_PROJECTS in the PROJECT-block.
What I meant to say with the cursor is that after the query is executed, the form has to navigate to the CCODE-item of the COMPANY-block.
Thx for helping me!
Kurt
|
|
|
Re: Problem with 2 LOV's [message #340335 is a reply to message #340320] |
Tue, 12 August 2008 06:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Quote: | The form always navigates to the item CCODE in the COMPANY-block.
|
That happens when the navigation is incorrectly set. As it is about the PB_LIST_PROJECTS push button, try to put something like this into the WHEN-BUTTON-TRIGGER body:go_item('pb_list_projects');
list_values;
Quote: | when I press enter-query, I should have the possibility to use the LOV_C by pressing the PB_LIST_COMPANIES in the COMPANY-block OR to use the LOV_P by pushing the PB_LIST_PROJECTS in the PROJECT-block.
|
Wrong again. As this is the master-detail relationship, entering query mode sets focus into one of these blocks. If you are currently in the master block and press "enter query", Forms' triggers/procedures (which are not to be modified) will do their job, clear both master and detail block and wait for user's input (i.e. search criteria) and "execute query" action.
So, FIRST query master records. Once you get the result, go to the detail block, "enter query" again, enter search criteria for the detail block and "execute query". Doing so, you'll first filter master records and - within this result set - corresponding detail records.
Quote: | after the query is executed, the form has to navigate to the CCODE-item of the COMPANY-block
|
It will, if the query is executed in the "company" block and CCODE is the first navigable item in this block, or by modifying the KEY-EXEQRY trigger asexecute_query;
go_item('company.ccode');
|
|
|