Try to avoid looping through related records, use group functions instead
looping through related records can sometimes seriously affect system’s performance.
Looping through related records in formula bodies might cause errors in the script if the
formula reaches more than 10k characters