[SOLVED] Â Send E-Mail only if one column is updated |
10/16/2019 6:08:50 PM |
PHPRunner General questions | |
M
Melanie authorDevClub member
I have an HTML email that is being sent on a record edit - (after record updated event). The e-mail it sends is very nice and is working well, but I have 2 columns that can be edited there, Employee name and Confirmation number. I need one e-mail to go if the employee name changes and a different one to go if the confirmation number changes. |
|
![]() |
Sergey Kornilov admin 10/17/2019 |
Something like this: if ($values["Employee name"]!=$oldvalues["Employee name"]) { |
M
|
Melanie authorDevClub member 10/22/2019 |
So I tried this - and echoed the $values and the $oldvalues to make sure they were different, but the mail does not send - the else happens. </td> |
M
|
Melanie authorDevClub member 10/24/2019 |
so I have tested some more and discovered that if I echo $values["emp_name"] and $oldvalues["emp_name"] they are the same. So that is why I am getting the else statement (and they are both showing the old value). So why is $values not giving me the new one? |
![]() |
lefty 10/25/2019 |
so I have tested some more and discovered that if I echo $values["emp_name"] and $oldvalues["emp_name"] they are the same. So that is why I am getting the else statement (and they are both showing the old value). So why is $values not giving me the new one?
|
M
|
Melanie authorDevClub member 10/25/2019 |
The e-mail itself works - if I change the if to be = instead of != the email sends. The problem is that $values is always = $oldvalues so I cannot seem to correctly use an if else as I would like. And I am using 10.1 for this project. |
![]() |
Sergey Kornilov admin 10/25/2019 |
You should try the latest version. Maybe you are dealing with the bug that was fixed in later versions. |
M
|
Melanie authorDevClub member 10/31/2019 |
I just tried it in the latest version I am doing this currently: |
![]() |
Sergey Kornilov admin 10/31/2019 |
I have tested in PHPRunner 10.3 and it prints to different values in AfterEdit evenm. echo $values["Description"];
|