Jump to content
  • 0

Task - Send Email To User W/ Link to Report From Previous Day


kpcollier

Question

My supervisors submit a form to the SV_Daily table every day. Sometimes this is in the morning, sometimes it is in the afternoon - whenever they can get to it. 

I also have a report datapage that is filtered by the ID by parameter in the SV_Daily table.

I'm trying create a task that will send out a link to the report datapage, that shows the supervisors their submitted information from the previous day. I'd like to send this out at 8AM in the morning. However, like previously stated, sometimes the supervisors enter these in during the afternoon. In this case, 24 hours doesn't go by before the 8AM task run period. Likewise, if they entered in another submission for the day before the 8AM task run time, then I wouldn't be able to just choose the latest record submitted by the SV, as it would pull up the submission from that same day. 

How can I make sure that my task is sending an email with a link to the correct supervisors, and make sure it is the report that they submitted the previous day?

Below, the join gets me the Supervisor's email. I think this portion works. However, the WHERE clause is where I am getting stuck. What if it isn't a perfect 24 hours?

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

From what you are using there, I think you should switch the position of the timestamp and the actual date field.

Also, no matter what is the time values, using a difference in 'days' will make the system refer to the date instead of date and time thus even if you have a time values of 

03/08/2022 23:29:39  compared to 03/09/2022 00:29:39, even though there's not even 24 hours difference between them, it will already be considered as 1 in difference in days.

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...
×
×
  • Create New...