AnsweredAssumed Answered

Child summary field does not update on parent layout after Perform Find

Question asked by andrewjohnwhitmore on Jan 16, 2019

Hello,

 

I have a database to hold property management information, with the following structure:

 

  • Company --< Fund ---< Property

 

i.e. a "Company" can have multiple "Funds", and a "Fund" can have multiple "Properties". In my solution there will only ever be 1 company.

 

I have a layout on Company that acts as an overview screen, and I would like to display the total number of Properties for the entire Company. I would also like the user to be able to select a Fund, and then the total would change to the Property count for that specific Fund. Choosing a Fund here would also restrict other parts of the database to only show data for that specific Fund (i.e. the property layouts).

 

I tried to achieve this by having a summary field on Property that is a count of the primary key (ID). This field is then placed on the (grand) parent Company layout and does indeed show the correct figure.

 

I then hooked up a Fund selector to a script which performs a find on the database, to limit the Properties to only those with a specific Fund ID. This however does not update the total on the Company layout as I was expecting...! It remains as a total for the number of Properties for the whole Company.

 

If I look at my Property layout I can see that the records are indeed filtered to the specific Fund, and the summary field on that layout does show the correct (lower) total.

 

Any ideas why the summary field used on the parent record is not updating when the (grand) child found set is changed?

 

There will be other aggregate functions that I would want to work in the same way, for example sums of property value.

 

Thank you in advance

Outcomes