Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By alisoroush7
#829735
hi guys
i have an idea in my mind. i have the birth date of our employees. is it possible to send an automatic email for greeting using process maker?

any comment is appreciated.
User avatar
By ronrich
#829744
Hello alisoroush7,

Yes, it is, but not as it comes out of the box, there are timer events that could help but those are not available in the community version.

In this case, you could use a cronscript to read the user's properties, and based on the birth date it will send the greetings email. Since it is a corn job, you set it to run on a dayli basis.

I hope this helps.
By alisoroush7
#829748
ronrich wrote: Thu Feb 10, 2022 10:05 am Hello alisoroush7,

Yes, it is, but not as it comes out of the box, there are timer events that could help but those are not available in the community version.

In this case, you could use a cronscript to read the user's properties, and based on the birth date it will send the greetings email. Since it is a corn job, you set it to run on a dayli basis.

I hope this helps.
thanks for your recommend. but can you please tell me about the code?
User avatar
By ronrich
#829750
Hello alisoroush7,

You need to query the USERS table and then loop the result looking for the matching dates to send the email.
Code: Select all
$sql = 'Select USR_FIRSTNAME, USR_LASTNAME, USR_BIRHTDAY, USR_ from USERS_EMAIL';
$result = executeQuery($sql);
foreach ($result as $user){
   if (date("Y-m-d") == date("Y-m-d", strtotime($user['USR_BIRTHDAY'])){
     $email = $user['USR_EMAIL'];
     $fullname = $user['USR_FIRSTNAME']." ".$user['USR_LASTNAME'];
     PMFSendMessage(.....);
}
}

I hope this helps, you still need to add the rest of the logic.

Kind regards,
By alisoroush7
#829919
ronrich wrote: Mon Feb 14, 2022 4:01 pm Hello alisoroush7,

You need to query the USERS table and then loop the result looking for the matching dates to send the email.
Code: Select all
$sql = 'Select USR_FIRSTNAME, USR_LASTNAME, USR_BIRHTDAY, USR_ from USERS_EMAIL';
$result = executeQuery($sql);
foreach ($result as $user){
   if (date("Y-m-d") == date("Y-m-d", strtotime($user['USR_BIRTHDAY'])){
     $email = $user['USR_EMAIL'];
     $fullname = $user['USR_FIRSTNAME']." ".$user['USR_LASTNAME'];
     PMFSendMessage(.....);
}
}

I hope this helps, you still need to add the rest of the logic.

Kind regards,
should i change anything in your code? or i should just configure the pmfsendmessgae() ?

Hi alisoroush7, Currently, this function is not a[…]

Hi mhasgari , Yes, will be possible as you are us[…]

about update report tables

Hi enttsh, I share with you the official document[…]

On click on Grid Row

the method setOnchange does not work $("#\\[[…]