# Discussions

View Only

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

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

Posted 07-28-2017 17:34
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])

• #### 2.  RE: How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

Posted 07-28-2017 17:45
the formula looks to be in order. What is the error you are getting?
What is the type of the field you are creating?

• #### 3.  RE: How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

Posted 07-28-2017 17:55
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.

• #### 4.  RE: How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

Posted 07-28-2017 17:59
What field type is Date Completed.

Maybe it is a date / time field type and it needs to be a Date type.

• #### 5.  RE: How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

Posted 07-28-2017 17:59
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...

• #### 6.  RE: How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

Posted 07-28-2017 18:09
It is on Work Date formula, tried it as Date formula too, still not working.

Date Completed is a user input date field.

• #### 7.  RE: How do I make this work? If( IsNull([Date Complete]) and [Status]=""Completed"",ToDate([Date Modified]), [Date Complete])

Posted 07-28-2017 18:13
Try adding a ToDate before [DateComplete]
maybe like this?

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