Re: Forms 6.0 - Item value getting Cleared!!

From: (wrong string) öström <lasse.sjostrom_at_telia.com>
Date: Tue, 14 Dec 1999 22:48:24 GMT
Message-ID: <YOz54.298$an3.188528640_at_newsa.telia.net>


To make the detail block follow the master should not really be a problem. You have to define the RELATION, dont recall where...somewhere. And FORMS will make some procedures based on that relation to do proper synchronization.

Lars

Eric Raskin skrev i meddelandet ...
>Back again, with a little more resolved. I was querying the wrong block!!
>Instead of querying the MASTER block and allowing it to automatically
>populate the DETAIL blocks, I now query the DETAIL block directly, before
>returning to the MASTER block. This stops the "Save Record" message for
the
>MASTER block.
>
>Now, I'm getting "Do you Want to Save Changes" for the DETAIL block!! I
>really want the DETAIL block to be Query only, but I get FRM-41051 if I
turn
>off the "Insert Allowed" property. So, I have to allow inserts in a
>display-only DETAIL block. This is really confusing!!
>
>Anyone tell me what I've done wrong now?
>
>Eric
>
>Eric Raskin <eraskin_at_paslists.com> wrote in message
>news:s5crgvo45349_at_corp.supernews.com...
>> Sorry to reply to my own post, but I found part of the problem. I looked
>at
>> the Debug Messages again.
>>
>> It seems the trigger sequence is :
>>
>> ON-CLEAR-DETAILS
>> ON-POPULATE-DETAILS
>> PRE-QUERY
>>
>> Since I was setting the ID in the MASTER block in PRE-QUERY,
>> ON-POPULATE-DETAILS was already called. Won't ever work! :-) I changed
>my
>> FIND form to load the data directly into the MASTER block (rather than
>> through a parameter). Now the data is getting where it belongs.
>>
>> The new problem is that, after setting the value in the MASTER block,
>Forms
>> 6.0 thinks it is a New record (which it will be when all the fields are
>> filled in). When I switch back to the Master block, I get asked "Do you
>> want to save the changes you have made?" before it goes to query the
>DETAIL
>> block. Worse yet, it clears the ID field right after asking this
>question,
>> to get ready for the new record it thinks it needs to create.
>>
>> So, what is the correct way to code this? I'm trying to accomplish
>finding
>> an ID, setting it in the MASTER block and causing the detail to
>auto-query.
>>
>> ----- Original Message -----
>> From: Eric Raskin <eraskin_at_paslists.com>
>> Newsgroups: comp.databases.oracle.tools
>> Sent: Tuesday, December 14, 1999 10:57 AM
>> Subject: Forms 6.0 - Item value getting Cleared!!
>>
>>
>> > I've got an Forms 6.0 form with a master-detail block setup. Call them
>> > MASTER and DETAIL for this note.
>> >
>> > The MASTER block contains an ID, and the DETAIL block contains the
>details
>> > from another table for the ID.
>> >
>> > I have a third block (call it FIND) that does a query, allows the user
>to
>> > choose a row (by double-clicking on the row), and then returns the ID
>for
>> > the chosen row in a parameter. This works fine.
>> >
>> > I have a PRE-QUERY trigger on the MASTER block that copies the data
>> returned
>> > from the FIND block into the appropriate ITEM in the MASTER block.
>> > Debugging shows that this data gets where it belongs. The data looks
>good
>> > right before the end statement in the PRE-QUERY trigger.
>> >
>> > The problem is: After PRE-QUERY fires, and before ON-POPULATE-DETAILS
>> > fires, the item in the MASTER block gets cleared!!! I turned on "Debug
>> > Messages" (which shows the triggers that fire), and nothing seems to
>fire
>> > between PRE-QUERY and ON-POPULATE-DETAILS.
>> >
>> > What am I missing here? Why is the field clearing out?
>> >
>> > TIA
>> >
>> > Eric Raskin
>> > eraskin_at_paslists.com
>> >
>> >
>> >
>>
>>
>
>
Received on Tue Dec 14 1999 - 23:48:24 CET

Original text of this message