Find the closest date from a list

Hi,

How do I return the closest future date from a list when given a separate ‘input’ date.

I.e

I have a list of dates

  • 01/02/2025
  • 23/04/2025
  • 16/10/2025
  • 03/11/2025
  • 28/01/2026

Now given the ‘Input’ date = 12/08/2025 I want to find out how to return 16/10/2025

@AnthonyTham

Take the list date in value list property. (Either activity or Data transform)

Loop with value list property then

Take first date in DateValue from value list.

  • Check if DateValue > InputDate (Try to use @CompareDates(.ValueDate,.InputValue) function…)

    • If true set ClosestFutureDateDateValue

    • ClosestFutureDate will hold the closest date in the future.

@AnthonyTham

I would like to suggest a bubble sort to identify the closest date

Can you confirm me the input format (prefererably as a sample) so that I can provide you with a configuration snippet