Process Flow Data Comparison

Sort:
You are not authorized to post a reply.
Author
Messages
Chad Dirst
Advanced Member
Posts: 42
Advanced Member
    Thank you for taking the time to review my issue.

    I am trying to compare an employees termination date to today's date - 30 days.  However, my current setup/logic is not working.

    Here are the variables I have defined and the condition I am using. 

    Variables defined in Start Node
    localCurDay = today()
    localCurDay1 = AddDay(localCurDay,-30)
    localCurDay2 = getDateDME(localCurDay1)
    localCurDateM30 = pfDate(localCurDay2,"yyyymmdd")

    Javascript condition located in Branch Node:
    (GetEmployees_TERM_DATE=="") || (GetEmployees_TERM_DATE >= localCurDateM30)

    Thank you in advance.
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      I'm not sure, but it appears you are trying to compare a string date (GetEmployees_TERM_DATE) with a javascript date (localCurDateM30).

      Try this instead:  (GetEmployees_TERM_DATE=="") || (GetEmployees_TERM_DATE >= localCurDate2)
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      John Henley
      Posts: 3352
        Use this in your branch:
        GetEmployees_TERM_DATE =="" || GetEmployees_TERM_DATE >= DateString(AddDay(today(),-30),'yyyymmdd')
        Thanks for using the LawsonGuru.com forums!
        John
        You are not authorized to post a reply.