SAP IRPA Desktop Studio ctx.outlook.search filter E-mails by Date will not Work

I am trying to identify e-mails dynamically based on the current date.

I am having troubles putting the variable inside the statement: Below on line 2 I try to concatenate PRDatafromProvider text with date which I set earlier. Perhaps the syntax is wrong. I set the date variable correctly and it logs fine.

ctx.outlook.mail.search({
   filter : "\"" + "urn:schemas:httpmail:subject" + "\"" + "= 'PRDatafromProvider'" + date + " AND 
" + "\"" + "urn:schemas:httpmail:read" + "\"" + "= 0",
   //"urn:schemas:httpmail:date" + "\"" + "= '20200610'",
   maxRow : 10,
   dontThrowExceptionIfNoMailFound: true
});

Another question is the 4th line above, I comment it out because the code works fine without it but when I put that line back it will not executed and break the search method. This is why I am trying to put it in subject so that I can somehow go around it...

I am usually active online: if I missed any details, I can provide them quickly.

Upvotes: 1

Views: 433

Answers (0)

Related Questions