Check record by record if end date is (exactly equal to15 days from now) and send notification ( if 15 records met the condition then 15 notification to be sent)

Bhavana Reddy
Mega Guru

Hello Guys,

For the above approach we can use schedule job but my question, we want to check record by record suppose lets say we have 10 records which meets the condition( end date is exactly equal to 15 days from current date) then we must send 10 notifications ( each record one notification)

Can anyone give me some idea how to send notification from each record when it meets the condition( i have to include the several record specific data in the Notification )

 

Thanks,

 

1 ACCEPTED SOLUTION

Hi,

the encoded query I gave checks if end date is after 15 days from now and before 16 days from now

so it should give exact 15 days

If that doesn't work you can iterate and find the difference in days between now time and the end date and if it is 15 then send email

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use flow designer for this with no script

Query would be something like this

end_dateRELATIVEGT@dayofweek@ahead@15^end_dateRELATIVELT@dayofweek@ahead@16

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Yes, Here i want to check each records and send one notification per record to their business owners

 

ex: if 10 records met the condition then send 10 notifications should be sent( one record 1 notification)

 

I cant use "Relative" query because i am checking whether the end date is exactly equal to 15 days not above 15 days

 

 

Hi,

the encoded query I gave checks if end date is after 15 days from now and before 16 days from now

so it should give exact 15 days

If that doesn't work you can iterate and find the difference in days between now time and the end date and if it is 15 then send email

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Bhavana Reddy 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader