Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

IF expression in calculated field

Avatar

Level 2

Hello! Is it possible to use predecessor planned completion date in an IF expression.

We are trying to create an expression that will highlight a line in red if the planned completion date does not match the predecessor planned completion date.

IF(Planned Completion Date!=Predecessor Planned Completion Date,"Yes","No") is a invalid expression. Am I missing something?

Thank you!

0 Replies

Avatar

Level 10

Hmmm...

This works in an assignments report column:

displayname=Date Match

namekey=task

textmode=true

valueexpression=IF({plannedCompletionDate}!={predecessor}.{plannedCompletionDate},"yes","no")

valueformat=HTML

That being said, I have not been able to successfully use text based expressions (IF, CONCAT, etc) on date/time calcs in a form. If you even DID get it to work, it would not honor the standard time zone rules as all text based calcs use the default time zone when referencing dates.

This doesn't say invalid expression but it still doesn't work:

IF(Planned Completion Date=Actual Completion Date,"yes","no")

I suspect it's because the predecessor date is a reference and form calc won't even entertain that.

Because Workfront hasn't remedied this, I would suggest a report-based calculation rather than form-based.

But if you do get anything to work, I'd love to hear how it's done.