Page 1 of 1

does not update the value if there is already a value

Posted: Wed Mar 06, 2024 3:04 pm
by Rachman

Hi,
I have a datetime field type Auto-Update Value = CurrentDateTime().
how do I update my datetime data and it doesn't change.
datetime changes only occur when adding new data

Thank You

if (CurrentPageID()== "edit"){
        if (empty($this->date_in->DBValue)){
            $rsnew["date_in"] = CurrentDateTime();
        } else {
            // If the value already exists there is no need to update it again
        }
    }

Re: does not update the value if there is already a value

Posted: Wed Mar 06, 2024 5:20 pm
by arbei

Rachman wrote:

if (empty($this->date_in->DBValue)){

You should check $rsold["date_in"] instead.


Re: does not update the value if there is already a value

Posted: Thu Mar 07, 2024 2:42 pm
by Rachman

noted, thank you