Forum Discussion

MeredithMoore1's avatar
MeredithMoore1
Qrew Cadet
8 years ago

How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

This is the formula that I have. I don't know why it keeps throwing errors/

If(
IsNull([Date Complete]) and [Status]="Completed",ToDate([Date Modified]),
[Date Complete])
  • AlinMihalcea1's avatar
    AlinMihalcea1
    Qrew Assistant Captain
    the formula looks to be in order. What is the error you are getting?
    What is the type of the field you are creating?
  • I'm in my tasks. I am losing my mind on this... :(

    ---------------------------------------------------------------------------------------------------------------------
    Formula error -- Bad or missing arguments in function call

    The types of the arguments or the number of arguments supplied do not meet the requirements of the function If.

    The function is defined to be If (Boolean condition1, result1, ..., else-result).

    You may need to do one of the following to fix the problem:
    • Choose the right number and type of arguments.
    • Use a type conversion function to convert the arguments you are using to the correct type.
    • Choose a different function.
  • AlinMihalcea1's avatar
    AlinMihalcea1
    Qrew Assistant Captain
    Make sure the formula type is formula date. I just replicated your situation on one of my apps
     and I got no complaint from it...
  • What field type is Date Completed.

    Maybe it is a date / time field type and it needs to be a Date type.
  • It is on Work Date formula, tried it as Date formula too, still not working.

    Date Completed is a user input date field. 
  • AlinMihalcea1's avatar
    AlinMihalcea1
    Qrew Assistant Captain
    Try adding a ToDate before [DateComplete]
    maybe like this?

    If(IsNull([Date Complete]) and [Status]="Completed",ToDate([Date Modified]),
    ToDate([Date Complete]))