Formula Editor

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

Formula Editor

Post by cklahr »

How do I code dates within an If Then formula?

I would like to code the following: If the property is in a particular county, the requested tasks due date should be 2 days after requested. Otherwise, it should be 5 days after requested. Please advise.

Thanks.
Mark McKenna

Re: Formula Editor

Post by Mark McKenna »

I apologize for the delay. Try this:

Code: Select all

If ( {{Order.Property[1].County}} == "Wake" ) Then
	Value = DateAdd( {{.RequestedDate}}, 2, "d", true )
Else
	Value = DateAdd( {{.RequestedDate}}, 5, "d", true )
EndIf
Note that a requested task has no explicit relationship with a particular property, so here we assume that it's the first property in the order that should be consulted.
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

Re: Formula Editor

Post by cklahr »

Thank you very much. That works great!!
Post Reply