Need a little bit of help. This is likely an issue of me not fully understanding the instructions for the Scheduled email task.
I have a single list comprised of individual's names along with the expiration dates of their assorted certifications and the site that they work at. What I need the email task to do is find all the names of a particular site that have certifications expiring within 30 days of the current date (90 for one of them). The task is set to run daily and it definitely as I'm getting an email but it doesn't contain any of the expected data. It just has a literal output of the query it tried to run and says "0 records." I have data in my list that should result in at least one record coming out.
Here's the EVAL code.
Your help is greatly appreciated. Thank you.
I have a single list comprised of individual's names along with the expiration dates of their assorted certifications and the site that they work at. What I need the email task to do is find all the names of a particular site that have certifications expiring within 30 days of the current date (90 for one of them). The task is set to run daily and it definitely as I'm getting an email but it doesn't contain any of the expected data. It just has a literal output of the query it tried to run and says "0 records." I have data in my list that should result in at least one record coming out.
Here's the EVAL code.
PHP:
// Map row data to shortened variables
$center = {staff_certifications___center_raw};
$cpr = {staff_certifications___cpr};
$fa = {staff_certifications___first_aid};
$tb = {staff_certifications___tb};
$cda = {staff_certifications___cda};
$can = {staff_certifications___child_abuse_neglect};
$ss = {staff_certifications___safe_sleep};
// Checks conditions to see if name should be included on email
if ($center == 2)
{
if (strtotime($cda) > strtotime('-90 day') || strtotime($cpr) > strtotime('-30 day') || strtotime($fa) > strtotime('-30 day') || strtotime($tb) > strtotime('-30 day') || strtotime($can) > strtotime('-30 day') || strtotime($ss) > strtotime('-30 day'))
{
$name = {staff_certifications___name};
return name;
}
else
{
return false;
}
}
else
{
return false;
}
Your help is greatly appreciated. Thank you.