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
- 63.8K Get Help
- 406 Global Discussions
- 218 Industry Talk
- 457 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!