good day… i saved my file from last week however im not sure why its not working now. im getting this error. Thanks in advance
In which activity you are getting this error.
Actually this error will occur when we are trying use some value where is it not available technically.
im getting this error in for each loop activity, im not sure what hapenned but i havent change in the workflow but it starts throwing this error.
That means no mails available in messages variable.
Check that count and check mailbox for mails
I already checked it and there is.
Please check in Debug mode to see if Messages hold values (Messages should be of Type : List<System.Net.MailMessage>
Also
mail should have a Type Argument of System.Net.MailMessage)
it was set to
@julius.mapili
Please can you share the sequence before the for each
Before the for each
In a writeline activity print the count of mails as
Messages.coun.tostring
This should not be zero, it should have some value for further processing in the for loop
Main.xaml (19.0 KB)
It looks fine. Please check if the MailFolder "“Inbox\Sykes Vendor Inbox” you are referring to is correct and has emails . What happens when you debug? What is the info you get in Messages?
@SowmyaLeo when i add the Messages.coun.tostring before the for each gives the same error.
is null - so it hasn’t fetched any emails. Please check if the folder has emails to process.
Yes i Have 441 email to process
@julius.mapili
Is the folder path correct “Inbox\Sykes Vendor Inbox” . Please ensure the spaces and case of the letters in the folder name is correct.
Yes it is correct.
Hi
inside the FOR EACH loop are we using any variable (i see like variable1 n the variable panel) is used whose value is not yet initialized…
because we might get this error if we are trying to use a variable which doesnt have any value before using FOR EACH loop but going to be used inside it before initializing
like if i have a variable which i m getting as output from any activity within for each loop…but and if that variable is used anywhere within the loop…make sure that it has any default value…because when we create a variable within for each loop, it gets created with that as scope, but wont have any value in it…so does this occurs
so ensure that we have created or used any variable inside the for each loop is initialized with a default value in VARIABLE PANEL
Cheers @julius.mapili
Hi @Palaniyappan thank you for responding. please see below regarding the variables coded in for each activity
what were mentioned in that auto close message box
@julius.mapili