Hi,
i have a scenario where we have a below dates
example:
10/12/2023 - pending
10/13/2023 - pending
10/05/2023 - pending
10/07/2023 - pending
Bot will filter the PENDING dates and it has to extract the next pending date but when we use a minimum function we are getting the older date than current date ex: (10/07/2023), so here bot has to consider the current date and extract the next pending date and also it has to extract the pending date if it is on the current date
please, can u create a workflow and send it … plz
Initialize the following variables:
- CurrentDate (DateTime) = Now
- NextPendingDate (DateTime) = CurrentDate.AddDays(365) // Initialize with a future date
For Each date in your list:
If date.Status = "pending":
If date.Date >= CurrentDate:
If date.Date < NextPendingDate:
Assign NextPendingDate = date.Date
Log the value of NextPendingDate (this will be the next pending date considering the current date).