0

I am using a process builder to create task whenever Lead is created . For Task Due Date I want to set always Thursday or Tuesday. Means if I am creating task today (Thursday), then due date should be today.. If I am creating task tomorrow (Friday) then the due date should be Tuesday.. if I am creating task on Wednesday then the due date should be on Thursday. It will always what is the nearest date from today (Tuesday or Thursday).. I am trying with this formula, but not working

CASE( 
    WEEKDAY(TODAY()), 
    0, Today() + 2 , 1, Today() + 1 , 2, Today(), 3,
Today() + 1, 4, Today() , 5, Today() + 4, 6, Today() + 3,"Error"

)

Getting Error -

The formula expression is invalid: Incorrect parameter type for function 'CASE()'. Expected Date, received Text
0

Since you're trying to return a Date value in the formula, you can't have a Text value of "Error" as the default. You'll have to use a Date or NULL as the default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.