Ability to add a Field which is Derived from other fields (i.e. Formula)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ayush
    Junior Member
    • May 2015
    • 20

    Ability to add a Field which is Derived from other fields (i.e. Formula)

    Hi Team,

    Can we please have the ability to add a derived field i.e. a field which is based on the value of other fields? Possibly allowing us to input a formula or an SQL statement will be awesome.

    I am currently running into an issue where I want to add a "Time taken" field in the "Task" entity. This would basically be = End Datetime - Start Datetime. I would then run a report on top of this to look at Customer Service reps with highest "Time taken".

    There are many other places where such a functionality will be useful.

    What do you guys think?
  • yuri
    Member
    • Mar 2014
    • 8557

    #2
    Hi

    In future. But not soon. It's not very hard to implement such thinhs for javascript developer for now.
    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

    • ayush
      Junior Member
      • May 2015
      • 20

      #3
      Hi Yuri,

      I am happy to have my devs take a look at this and share the code with your team. Can you please point us in the right direction? Which files should we be taking a look at if we want to have this option in the Entity Manager.

      We have taken a look at adding such an option for Task specifically. It would be very similar to the DateEnd field and the associated JS (client\modules\crm\src\views\task\fields\date-end.js). But we aren't sure how we would go about it if we were to make this option available at the Entity Manager level.

      Thanks!

      Comment

      • yuri
        Member
        • Mar 2014
        • 8557

        #4
        1. You can create Hook beforeSave
        2. You can write you logic in Repository class in beforeSave method.
        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

        • ayush
          Junior Member
          • May 2015
          • 20

          #5
          OK. Great. Will have my team take a look at this.

          Thanks!

          Comment

          Working...