Advanced Pack report filter + Custom Formula

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • item
    Active Community Member
    • Mar 2017
    • 1480

    Advanced Pack report filter + Custom Formula

    Hi,

    i have make some custom formula https://docs.espocrm.com/development...on-in-formula/ .
    All custom formula work in entityManager->before...->Formula.

    But i will use theses custom formula in Report ->Filter->Expression.. but i see only out-of-box formula.

    There are no way for this or i am wrong ?

    sample function : currentWeek, nextWeek

    Thanks

    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​
  • yuri
    Member
    • Mar 2014
    • 8495

    #2
    Hi Item,

    It does not work either?
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8495

      #3
      Create custom/Espo/Custom/Resources/metadata/app/advancedReport.json

      Code:
      {
          "allowedFilterFormulaFunctionList": [
               "__APPEND__",
               "yourCustomFunction1",
               "yourCustomFunction2",
           ]
      }
      This should allow the functions but it won't make them to appear in autocompletetion.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment


      • item
        item commented
        Editing a comment
        Hi Yuri,
        thanks but not allowed or unknow function.. but
        out-of-box function :

        currentWeek :

        Expression w/ Operator :

        WEEK_NUMBER_1: (date)

        Equals

        datetime\format(datetime\today(),,'W')

        And for nextWeek :

        datetime\format(datetime\addWeeks(datetime\today() , 1),,'W')

        Thanks
    Working...