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
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!