Getting data from sub form
I've read thru a several examples but can't find or create a deluge script that does what I need.
Attached is a screenshot of my form called "Business Activities". It has a sub form called "Activity Review". I need to do two things:
1. Script to fetch all the "Next review dates" from each related sub form entry.
2. Review the "Next review dates" to find the latest one and copy that into the main form "Next review date" field.
So imagine there are two sub forms. One has review date 1/10/2018 and one has 1/12/2018, then the main form should use the later date, 1/12/2018, as to populate it's next review date.
I will need the script to run when the business activity is edited, and on the scheduler.
Thank you!