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
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 438 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 283 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!