AnsweredAssumed Answered

Portal stops updating normally after a record is added or deleted

Question asked by wladdy on Mar 11, 2011
Latest reply on Mar 14, 2011 by philmodjunk


Portal stops updating normally after a record is added or deleted


I have a database with three tables: 'Days', 'Shows' to record performances given on various days and 'Acts' to record the various acts making up each performance. There is a one-to-many relationship from Days to Shows and another one-to-many relationship from Shows to Acts.

With helpful advice from members of this forum, I built a single layout from which to create new and navigate existing Shows and Acts. This master layout shows the records from ‘Days’. It includes portal A showing related record from ‘Shows’ and portal B showing related records from ‘Acts’. In order for portal B to display the contents of any given how selected in portal A, I

1)   created in ‘Shows’ a Global Field,

2)   created a script to populate this Global Field with the Primary Key of the show selected in portal A

3)   created a relationship between between this Global Field and the Foreign Key in ‘Acts’

This system was suggested to me by PhilModJunk (Portals with children next to portals whith grandchildren). It work well as far as navigation is concerned: I can move around the Shows in portal A and the Acts in portal B are immediately updated.

However, the system stops working as soon as I enter or delete data in portal B. After I add or remove a record in B, when I return to portal A and select a new Show, the records displayed in B do not reflect the change. B goes back to normal updating if I select another Day (ie: another record in the master layout) or if I move to Layout view and then return to Browse view.

My script to populate the Global Field in Shows is not as fault, as Global Field gets properly updated as I navigate in portal A. Rather, it seems that Portal B just stops respecting the Shows-to-Acts relationship after a record has been added or deleted in portal B.

A peculiar feature of this anomaly is that when I browse through the records in A, in can still add new records to B, which will be linked to the proper record selected in A, as expected. Only, the other records in B do not disappear from view as they should and I end up in B with Acts having a Foreign Key different to the Global Field currently selected – a gross violation of the rules of the portal.

Any help to solve this mystery would be greatly welcome.  W.