Email Reminder (Flow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 09:55 PM
Hi!
I have this flow designer and it sends email reminder to a user.
The prob is it seems that the flow designer is not getting the other records output value.
I've set a condition here that "If send date is 2" (2 means - email send date is 2 DAYS apart from today's date.)
So it shows here in the 1st record that the email send date is 4 days apart from today's date .
However on the 2nd record and the other records, it shows the same "4" (All of the records have different dates on when the email was sent so its impossible to be 4 days apart from today's date)
Here's the script for my flow variable "send date":
var gr = new GlideRecord('custom_table');
gr.addEncodedQuery('u_sent=true^u_notification=test');
gr.query();
while (gr.next()) {
var send = gr.u_send_date
var dateField = new GlideDateTime(send);
var nowTime = new GlideDateTime();
var dur = new GlideDuration();
dur = GlideDateTime.subtract(dateField, nowTime);
var days = dur.getDayPart();
return days;
}
I'd appreciate any help . Thank you so much
0 REPLIES 0