Next earliest date after today

Hello,
I want my parent row to input the next earliest date after today from my child rows. I am using the following syntax but it is not working, please help.
=MIN(CHILDREN([Scheduled ACP visit]@row) > TODAY())
Best Answer
-
Hi @Inara
You can't include a criteria in the CHILDREN function, only a reference. But you can use a COLLECT function to collect the child rows that match a criteria, like this:
COLLECT(CHILDREN([Scheduled ACP visit]@row), CHILDREN([Scheduled ACP visit]@row), >TODAY())
This says collect the children of Scheduled ACP visit
If the value for the children of Scheduled ACP visit
is greater than today's date.
Then you can use your MIN function on that to find the soonest date.
=MIN(COLLECT(CHILDREN([Scheduled ACP visit]@row), CHILDREN([Scheduled ACP visit]@row), >TODAY()))
Answers
-
Hi @Inara
You can't include a criteria in the CHILDREN function, only a reference. But you can use a COLLECT function to collect the child rows that match a criteria, like this:
COLLECT(CHILDREN([Scheduled ACP visit]@row), CHILDREN([Scheduled ACP visit]@row), >TODAY())
This says collect the children of Scheduled ACP visit
If the value for the children of Scheduled ACP visit
is greater than today's date.
Then you can use your MIN function on that to find the soonest date.
=MIN(COLLECT(CHILDREN([Scheduled ACP visit]@row), CHILDREN([Scheduled ACP visit]@row), >TODAY()))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.1K Get Help
- 430 Global Discussions
- 149 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 154 Just for fun
- 74 Community Job Board
- 499 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!