Text/Numeric data type errors for Date field

Posted on 2005-04-25
Last Modified: 2013-12-18
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!
Question by:Aquilon7
    LVL 46

    Expert Comment

    by:Sjef Bosman
    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

    Author Comment

    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?
    LVL 46

    Accepted Solution

    Change to
        Field OldStatus:= Status;

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
    Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now