Hi @Cristian_Ionita,
Approach 1:
So you could do the check in an earlier If condition match.count>0
then go into the for each loop. This way you can remove the Then branch and keep it empty as this condition will already have been checked by the outer If condition.
Approach 2:
Referring the solution from :
Basically, this flow will ensure that when there are no matches, the for loop is never called and the Matches variable is reset using {}
or Nothing
Here is a sample file: MatchesSetToNull.xaml (12.7 KB)