Home » Developer & Programmer » Forms » how to synchronize master and detail records (Oracle Forms 10G)
how to synchronize master and detail records [message #663916] Mon, 26 June 2017 00:44 Go to next message
DoodsGavion
Messages: 3
Registered: June 2017
Junior Member
Good afternoon. I need to synchronize master and detail records. i have a master-detail form and i need to update an item in the detail based on the value of the item in the master.

In the detail block, i added a when-validate-item trigger (:fm_dvs_personnel_dt.dt_fund := :fm_dvs_personnel_ms.budget_fund)
In the master block, i added a key-commit trigger(synchronize;commit_form;)
When i changed the value of the item in master, only the first record of the detail is updated (a master record can have one or more detail records).

Thanks in advance.
Re: how to synchronize master and detail records [message #663919 is a reply to message #663916] Mon, 26 June 2017 02:52 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you want to update multiple detail records then you would need to go to the detail block, loop through the records and the block and set each one in turn.
You can't do that from WVI.

The fact that you're doing this does suggest your tables aren't in third normal form and probably should be.
Re: how to synchronize master and detail records [message #663920 is a reply to message #663916] Mon, 26 June 2017 02:57 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That looks like redundancy (keeping the same value in both master and detail block (presumably, tables as well)). If that's so, data model isn't correct (hint: 3rd normal form). Consider re-modelling it; as a side-effect, a Forms problem you currently have won't exist any more.

[EDIT] Ah; CM posted his message while I was writing mine. Anyway, now you have two opinions that match, so ...

[Updated on: Mon, 26 June 2017 02:59]

Report message to a moderator

Previous Topic: Unable to start the 12c nodemanager , OHS1 and WLS_FORMS
Next Topic: How to build a form depending on a Query
Goto Forum:
  


Current Time: Thu Mar 28 06:11:54 CDT 2024