IF statement - dynamic points selection and display?

I have two sets of points that can change dynamically and I need to create a measure distance representing the longest distance between the points. I also need to dynamically display ONLY the two points that will be used for the measurement. I can’t find a way to generate the points used for the measurement using the IF condition.

Please see the attached definition.

Dynamic_points_selection_and_display.gh (131.0 KB)

Try “Stream Filter”.(Sets --> Tree --> Stream Filter)

Dynamic_points_selection_and_display_re.gh (121.3 KB)

Thank you. Works good.