Announcement

Collapse
No announcement yet.

datetime\diff()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • datetime\diff()

    This calculated field formula does not appear to be working.

    The field daysUntilClosing is Varchar

    daysUntilClosing = datetime\diff(closeDate, datetime\today(), 'days');

  • #2
    Hello
    Just finished the testing of it on the demo. It works well. But only after saving. If you don't modify the record, formula doesn't trigger

    Comment


    • #3
      Hi tanya

      I just realized that it works perfectly on some records and others it shows 'None' (even after updating record)

      This is what I get on my log

      [2018-02-20 15:53:22] Espo.ERROR: Formula failed: [] []
      [2018-02-20 15:53:42] Espo.ERROR: Formula failed: [] []
      [2018-02-20 15:53:52] Espo.ERROR: Formula failed: [] []
      [2018-02-20 15:54:40] Espo.ERROR: Formula failed: [] []

      Comment


      • #4
        Possible reasons:

        1. closeDate could be incorrect.
        2. you could have other rules in formula before. One of them failed, the next weren't triggered.

        Comment


        • #5
          I realized that if I create a new record the formula works, but does not work with records that are older and were created prior to the additional fields and formula.

          It's like the database it not updating old records for those new fields.

          Comment


          • #6
            Formula works for old record as well, if you set a correct rule. Check your rules again

            Comment

            Working...
            X