J
|
Jane 1/30/2009 |
Hi, global $data; if ($data["Status"]=="closed") $value = date("d/m/Y"); |
![]() |
hichem author 2/2/2009 |
Hi, use custom format on the "View as" settings dialog on the Visual Editortab. Here is a sample:
|
J
|
Jane 2/2/2009 |
Hi, if ($values["Status"]=="closed") $values["DateTimeClosed"] = now(); |
N
|
nickditrolio 2/3/2009 |
What is the difference between $data["status"] and $values["status"]? When do you use each? Hi, use Before record added/Before record updated events to update this field. Here is a sample: |
![]() |
hichem author 2/3/2009 |
What is the difference between $data["status"] and $values["status"]? When do you use each?
if ($values["StatusId"]==1) {$values["DateTimeClosed"] = now();} else {$values["DateTimeClosed"] ='';} return true;
|
J
|
Jane 2/3/2009 |
The function BeforeEdit has a set of parameters that you can see in event.
Jane, am I right in understanding that some logic can be used to compare for example the $values["DateTimeClosed"] to $oldvalues["DateTimeClosed"] and use that to only update records if some critera is fulfilled?
if ($values["DateTimeClosed"]!=$oldvalues["DateTimeClosed"]) { //field value was changed //... your code here } |