Post Closed
55
Views
7
Comments
Solved
automate email with some conditions

this is the situation

like after a form/incident is submitted by the manager

it needs the approval/rejection from the Team leader

from the day of submission the T Leader gets 3 days time if he doesn't respond

on 4th day a mail needs to be sent to him as a remainder and if he fails to respond on 7th day a mail needs to be

sent to the Unit Head.

How do I do it?


please help me out
thank you in advance


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Dhillan,

Typically you would solve this using BPT, but... BPT is pretty advanced, and if you're just beginning, this wouldn't be my recommendation. An alternative could be a Timer that runs at least once a day, checks whether there are still incidents that need team leader approval and that are at least 3 days old, and then send an e-mail.

UserImage.jpg
Dhillan S B

now here I have one challenge

if I implement this method (i.e Timers)
according the my client she want Saturdays and Sundays to be not consider as days
for example if the TM submits on Friday -------Monday---Tuesday
here the 4th day is Wednesday
Sat and Sun are non working days how do I achieve this?

also Can you share BPT post that will help me learn it.

2023-03-16 16-29-51
Paulo Rosário
Solution

Hello Dhillan S B ,

You can do this by creating a timer that will check the date on which the Form/Incident was submitted and see if 3 days have passed. 

If so you can send an email warning the Team Leader.

For more information on Timer please take a look at this post.

Hoppe it helps!

Paulo Rosário

UserImage.jpg
Dhillan S B

now here I have one challenge

if I implement this method
according the my client she want Saturdays and Sundays to be not consider as days
for example if the TM submits on Friday -------Monday---Tuesday
here the 4th day is Wednesday
Sat and Sun are non working days how do I achieve this?

2020-11-13 07-48-15
Khuong Truong
Solution

Hi Dhillan,

As for your requirement about ignore none working day, I suggest that you implement an action to calculate the submitted day (this result is use for getting data to send email) if today is 4th day.

In the action you can have a loop with a local variable called CurrentDate and assign today as start. Inside the loop you can check if CurrentDate is non working day by using https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Date_and_Time#DayOfWeek function. If non working day then ignore, if working day then set CurrentDate = addDays(CurrentDate, -1). 

Need to have a counter (local variable) as a check and stop the loop.

Hope you get the idea.

Regards,

Khuong

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Dhillan,

Typically you would solve this using BPT, but... BPT is pretty advanced, and if you're just beginning, this wouldn't be my recommendation. An alternative could be a Timer that runs at least once a day, checks whether there are still incidents that need team leader approval and that are at least 3 days old, and then send an e-mail.

UserImage.jpg
Dhillan S B

now here I have one challenge

if I implement this method (i.e Timers)
according the my client she want Saturdays and Sundays to be not consider as days
for example if the TM submits on Friday -------Monday---Tuesday
here the 4th day is Wednesday
Sat and Sun are non working days how do I achieve this?

also Can you share BPT post that will help me learn it.

2023-03-16 16-29-51
Paulo Rosário
Solution

Hello Dhillan S B ,

You can do this by creating a timer that will check the date on which the Form/Incident was submitted and see if 3 days have passed. 

If so you can send an email warning the Team Leader.

For more information on Timer please take a look at this post.

Hoppe it helps!

Paulo Rosário

UserImage.jpg
Dhillan S B

now here I have one challenge

if I implement this method
according the my client she want Saturdays and Sundays to be not consider as days
for example if the TM submits on Friday -------Monday---Tuesday
here the 4th day is Wednesday
Sat and Sun are non working days how do I achieve this?

2020-11-13 07-48-15
Khuong Truong
Solution

Hi Dhillan,

As for your requirement about ignore none working day, I suggest that you implement an action to calculate the submitted day (this result is use for getting data to send email) if today is 4th day.

In the action you can have a loop with a local variable called CurrentDate and assign today as start. Inside the loop you can check if CurrentDate is non working day by using https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Date_and_Time#DayOfWeek function. If non working day then ignore, if working day then set CurrentDate = addDays(CurrentDate, -1). 

Need to have a counter (local variable) as a check and stop the loop.

Hope you get the idea.

Regards,

Khuong

UserImage.jpg
Sara Almashharawi

have you found a solution ? please share @Dhillan S B 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Sara,

In general, replying to 2-year-old posts is considered not a good idea, as people generally don't recall specifics of problems they had 2 years ago, and everyone in the thread is now getting a notification. Also, I bet your problem isn't exactly the same as Dhillan's. So my recommendation is to create a new post with your question, and give your own detailed description of your specific problem.

I'm going to close this post now.