Text/Numeric data type errors for Date field

Good morning all...
I'm trying to create a formula to automatically have today's date populate a field when a different field named "Status" is changed to "Closed" or "Cancelled."

I'm not having any luck because I get errors for "Incorrect data type, number expected."

Can anyone offer a formula that would work?

So in the "Status" field, from picklist, the user selects either "Closed" or "Cancelled."  A "Date Closed" field should be populated with the date that the status was moved to "Closed" or "Cancelled."

Thanks in advance for your help!
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
Change to
    Field OldStatus:= Status;
Sjef BosmanGroupware ConsultantCommented:
In the DateField, Computed, use
    @If(OldStatus<>Status & Status="Closed":"Cancelled"; Today; Date_Field)

You need an additional field called OldStatus, Computed, with the formula
    @If(@IsDocBeingLoaded; Status; OldStatus)

And in the PostSave:
    Field OldStatus:= Status
Aquilon7Author Commented:
In the PostSave event, if I input your recommendation, I get an edit that says:

No main or selection expression in formula 'Status'

How do I get rid of this edit?
All Courses

From novice to tech pro — start learning today.