• Jacqueline Doan
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I'm working in Visual Workflow. I'm trying to generate a date via formula using an if function. My 'then' and 'else' statements are virtually the same, varying only by adding one month to a calculated date.

However, when my formula returns true on my 'if' statement, the 'then' statement gives me the correct date. When my formula fails my 'if' statement, the 'else' statement is blank.

Here is my formula:

IF(
{!NextPaymentDue}-{!SelectedCharge}<=0,

DATE(YEAR({!NextDueDate}),MONTH({!NextDueDate})+({!Days}/30)+1,DAY({!NextDueDate})+MOD({!Days},30)),
DATE(YEAR({!NextDueDate}),MONTH({!NextDueDate})+({!Days}/30),DAY({!NextDueDate})+MOD({!Days},30))
)

Successfully generates a date of 11/1/2014 when:
nextPaymentDue= 100
SelectedCharge = 150
Days=30
Next Due Date = 9/1/2014

Returns null when:
nextPaymentDue= 300
SelectedCharge = 150
Days=30
Next Due Date = 9/1/2014

Any ideas?