How to check List<MailMessage> is empty?

Hi I have an activity to get the latest email from today with a particular subject.

I want to be able to use an if statement after the Get Outlook Mail message to check whether the outputMessage of type List is empty or not

outputMessage.Count = 0

2 Likes

Hi,

Can you try the following expression in condition property of If activity?

outputMessage.Any

Regards,

1 Like

Hi @Automater999,

outputMessage is Nothing >> True if list is empty

or
outputMessage.Any >> true if list is not empty

Thanks,
Shubham Pratap

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.