Jump to content
  • 0

Task for Email if Field is Empty for X Amount of Time


kpcollier
 Share

Question

Hey there. 

I have a table with a "Shipping Confirmation" field. After an order is placed and we receive the shipping date/confirmation, we populate this field for the order. 

I am trying to set up a trigger to email the Manager associated with the order if "Shipping Confirmation" is blank after 4 days. I was thinking of using Task for this, and having it run a check everyday to find records with this restriction. I am not sure how to set up the Task trigger to only send an email when the field is still empty after 4 days.

Thanks

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Hello! 

It is possible to implement such a workflow using tasks. 

The only thing you need is to add the timestamp field to your table. 

1.thumb.png.9ce709a6dd9e3c5aaafaf0681235b3a6.png

This field will be filled as soon as you add a new "Shipping Confirmation" entry. Also, you can set up the task to run daily. 
In this case, the task will check if the Confirmation Date is blank and if the difference between the timestamp and today's date is 4 days.

Here is the example of the Task:

2.thumb.png.c2422e997f9749fa7556e8cc7ab0305c.png

 

Link to comment
Share on other sites

  • 0

Hello @Andrii, thank you for the reply! After working on this all day yesterday, I was actually able to create a trigger very similar to this one. However, it is not quite working for me.

I have supplied a screenshot of my trigger. Here is how it's suppose to work:

An Order is placed by one of our employees, which is saved under the Ordered_By field. Once that order is placed, it gets a timestamp for Order_Date. On the same table, there is a Shipping_Confirmation date that is to be populated once we receive a ship date. If the Shipping Date is blank for more than 4 days after the Order_Date, than the Task trigger sends a notification email to Ordered_By.

Ordered_By is populated from a separate table, Employee_Table, and is selected through a datapage. That is the reason why Ordered_By and Employee_Email have an Inner Join.

I included Received Date in the WHERE section to exclude completed orders. If the order has a received date, that means all materials have been received and the order is completed. 

My trigger validates. I have had people on the forums AND live support give me example triggers that look alike, however I cannot get the email to send. I am thinking it is something going wrong with my TO section in the Email, involving Employee_Email and Ordered_By.

Any help is great. Thanks.

8AvT2E.jpg

Link to comment
Share on other sites

  • 0
19 hours ago, kpcollier said:

Hello @Andrii, thank you for the reply! After working on this all day yesterday, I was actually able to create a trigger very similar to this one. However, it is not quite working for me.

I have supplied a screenshot of my trigger. Here is how it's suppose to work:

An Order is placed by one of our employees, which is saved under the Ordered_By field. Once that order is placed, it gets a timestamp for Order_Date. On the same table, there is a Shipping_Confirmation date that is to be populated once we receive a ship date. If the Shipping Date is blank for more than 4 days after the Order_Date, than the Task trigger sends a notification email to Ordered_By.

Ordered_By is populated from a separate table, Employee_Table, and is selected through a datapage. That is the reason why Ordered_By and Employee_Email have an Inner Join.

I included Received Date in the WHERE section to exclude completed orders. If the order has a received date, that means all materials have been received and the order is completed. 

My trigger validates. I have had people on the forums AND live support give me example triggers that look alike, however I cannot get the email to send. I am thinking it is something going wrong with my TO section in the Email, involving Employee_Email and Ordered_By.

Any help is great. Thanks.

8AvT2E.jpg

Hi @kpcollier,

I think you need to update a condition in your WHERE clause, base from your statement ' Once that order is placed, it gets a timestamp for Order_Date. ' your Order_date field will never be blank.  And 'AND' logic will only be TRUE (will be able to send any email) if all your condition is satisfied or meet.

And basing from your statement 'If the Shipping Date is blank for more than 4 days after the Order_Date,',  I think you can replace this condition (Order_date is blank) and evaluate the shipping date instead.

I hope my comment make sense.

Regards,

TsiBiRu 

Link to comment
Share on other sites

  • 0

Thanks, @TsiBiRu. I cannot believe I made such a silly mistake. Caspio Support had actually got back to me with the same solution just minutes prior to you replying to my post.

However, the change does not fix my issue. Caspio Support says they were able to get emails sent using the same table designs that I have, although after configuring my trigger to be like theirs (simply the change in the WHERE clause) I still cannot get this Task to work. 

I have a record created by me in the table, so I should get the email directly. The record does not have a shipping date. I have checked my Junk/Spam folders with no luck.

I appreciate the help,

Keith

Link to comment
Share on other sites

  • 0

Oops - I was wrong.

Before I made the change, Support had asked me to add a record straight to the table, not through the DataPage. This record triggered the Task email. I then made the Field Value change and made another test order to try it out. Thinking that I had received an email for that order, I had actually just kept getting the email from the Order that I hardcoded into the table. 

So, it is still not working. Works when I select a name from the dropdown in the table itself, however choosing a name from the dropdown in the Submission DataPage does not trigger the Task email. Weird.

Link to comment
Share on other sites

  • 0
1 hour ago, kpcollier said:

Oops - I was wrong.

Before I made the change, Support had asked me to add a record straight to the table, not through the DataPage. This record triggered the Task email. I then made the Field Value change and made another test order to try it out. Thinking that I had received an email for that order, I had actually just kept getting the email from the Order that I hardcoded into the table. 

So, it is still not working. Works when I select a name from the dropdown in the table itself, however choosing a name from the dropdown in the Submission DataPage does not trigger the Task email. Weird.

Hi @kpcollier,

Since you mentioned that the task email is working on the hard coded / manually entered value , I think it is safe to say that the email Task is actually working.

What I can suggest is to review how the value is being populated in your submission form, and double check that the field value is set to the actual email http://prntscr.com/mba9bq.

Since I have limited information, I can only provide you this much suggestion. What did the support told you to do?

Regards,

TsiBiRU 

Link to comment
Share on other sites

  • 0

I've fixed the error. One of the parameters I had set up on load for the Submission Page was capturing the wrong data type. It works now. However, something in the change to make this Task work has made the Insert & Update Acknowledgment Email stop working on one of the related Report DataPages.

Ugh, here we go.

Link to comment
Share on other sites

  • 0
1 hour ago, kpcollier said:

I've fixed the error. One of the parameters I had set up on load for the Submission Page was capturing the wrong data type. It works now. However, something in the change to make this Task work has made the Insert & Update Acknowledgment Email stop working on one of the related Report DataPages.

Ugh, here we go.

Hi @kpcollier,

It is good to know that your Task is now working, in regards to the new issue with your Acknowledgment email notification.

If you did not change anything on your Report DataPage, I think the things that you need to check for are the changes that you made to the table, which your Acknowledgement email is getting its data from. Then ensure that the field /data name in your Report Datapage and Acknowledgement email is also updated. 

I Hope this helps.

Regards,

TsiBiRU 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...