Home » Developer & Programmer » Forms » Help in LOV (Forms 6i)
Help in LOV [message #335611] Tue, 22 July 2008 23:42 Go to next message
rramanb
Messages: 2
Registered: July 2008
Junior Member
Hi,

I'm a newbie to Forms. Could anyone help me on this?

I have a LOV that displays the EmpNo and EmpName. I have 2 DataBlocks on my form. My idea is when i select a value on the LOV, it has to be displayed on the Datablock1 (that has 2 items EmpNo and EmpName), and the Datablock2 has the other Employee Details. I have the Relations created between the Datablock1 and the Datablock2 and the LOV is attached to the Datablock1's Items.

When i run the form and select a data on the LOV, i get the Datablock1 displayed with the selected values but the Datablock2 is empty. Do you know how to get the Datablock2 populated?

I could see that the form is working fine if i ignore the LOV selection and do the Enter Query (F7), Type the EmpNo and EmpName values manually on the Runtime and do the Execute Query (F8). It means that the Relation is working fine. But when i select a data from the LOV, the Employee Details Block is not populating any data.

Thanks
Raghu
Re: Help in LOV [message #335650 is a reply to message #335611] Wed, 23 July 2008 02:35 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The last part of your message is perfectly OK - a correctly created master-detail relationship will populate both master and detail block.

As of the first part of your message, well, that's Forms default behaviour - you have opened a LoV, selected some value and it ended up in the corresponding form item (which belongs to the first data block). As you are in INSERT mode, Forms waits for you to enter the rest of information - first into the master block, then into its details.

However, perhaps you might want to check use of "Copy Value from Item" and/or "Synchronize with Item" item's properties. (You'd set them for "empno" and "ename" items that belong to data block 2.)
Re: Help in LOV [message #335765 is a reply to message #335650] Wed, 23 July 2008 12:01 Go to previous messageGo to next message
rramanb
Messages: 2
Registered: July 2008
Junior Member
Littlefoot,

Thank you for your reply.

"Copy Value from Item" is automatically populated with the BlockName.ItemName when we create the Master Detail Relationship. "Synchronize with Item" displays all the other items on the current block which i think will not be useful. I wanted to populate the Detail Block Items with respect to the value of the Master Block Item values.

Actually, I'm creating a Query Only Application. I don't want to insert any data at Run Time except for querying purposes. Is there any way to achieve this?

Also, I tried looping through the Records and displaying it on the Detail Block using NEXT_RECORD but it challenges me to save the changes. Do you know how could i get rid of the "Save the changes" window when it populates the records?

Regards
Raghu

Re: Help in LOV [message #335805 is a reply to message #335765] Wed, 23 July 2008 16:35 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I wanted to populate the Detail Block Items with respect to the value of the Master Block Item values.

Actually, I'm creating a Query Only Application. I don't want to insert any data at Run Time except for querying purposes. Is there any way to achieve this?

OK, so it means that you have to be in query mode (if you don't want users to press ENTER_QUERY key, put it into the WHEN-NEW-FORM-INSTANCE trigger and the form will be in query mode when user enters.

Using a LoV in query mode and pressing EXECUTE_QUERY button/key will retrieve master and detail record. That's by default, as I've already said.

Reading your message again, it seems that you are, actually, in INSERT (instead of QUERY) mode. If that's so, well, make sure you don't do that. If you want to insert data, do it. If you want to query data, do it. But don't mix these terms, just as you don't eat an apple with your ears and don't listen to the music with your eyes.

Also, you might check Forms Help about running forms in QUERY ONLY mode which allows you to query the database, but not insert, update or delete records. It is done by calling the form using CALL_FORM or NEW_FORM built-ins along with the QUERY_ONLY parameter, such as
CALL_FORM('employees', no_hide, no_replace, QUERY_ONLY);

Or am I completely mistaken?
Previous Topic: Multiple applet in same oracle session
Next Topic: Query
Goto Forum:
  


Current Time: Tue Dec 06 14:21:38 CST 2016

Total time taken to generate the page: 0.09854 seconds