1 of 1 people found this helpful
I think you are saying you have one relationship depending on the results of another?
If so, you may need to use:
Refresh Window [ Flush cached join results ]
to get the dependent relationship update its related set.
Thanks for your help. I'm one step closer.
I put a script trigger on the data entry field that is input to the calculation for one key (OnObjectExit) and now the calculations are refreshed, for that key change!
The other key is not a data entry key. It is a count of some related records which I add to or subtract from by adding records in a portal. I'm not sure how to incorporate a Refresh in that case.
I am afraid I don't follow your description. Why don't you post a file (preferably a simple one) that demonstartes the problem?
Depending on the context, sometimes a field which is calculating from a portal relationship will update when you click inside the field itself. Perhaps you could incorporate in your script a Go to field(your count field) then Go to field() (ie. leave the field again) to force the refresh.
Sorry for the confusion.
Your Refresh Window suggestion has worked. I put a script trigger to Refresh OnObjectExit on one of the key fields. I put the same script trigger in a portal on the related record's key field which also works when a related record is added. In both cases, the calculation fields recalculate automatically.
I still have a problem when portal rows are deleted. My calculations depend on a count of related records and therefore should recalculate when a portal row is deleted. This still isn't happening. I have a "delete record" button at the end of each portal row to which I added a Refresh Window command, but it doesn't seem to make a difference.
I've added a stand alone Recalculate (Refresh Window) button which works, but I'd rather it was built in.