Announcement

Collapse
No announcement yet.

Can I use a field to get the sum value of another field between certain period?

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

  • Can I use a field to get the sum value of another field between certain period?

    Hi,

    I want to set a field (say "amountSum") in "Opportunity" entity and make its value as "sum of amount in past 30 days (or in current month)". How can I achieve this?

    amountSum = sum of "amount" in current month.

    Thanks for help.

  • #2
    Hi there,
    Could you explicit it? Do you you want to create a field in Opportunity to store there the sum value of the all Opportunity records amount in the current month?

    Comment


    • #3
      Thanks for your attention.

      Yes what I want to do is as follows:

      1. in entity Opportunity onlly
      2. create a field "amountSum"
      3. make "amountSum" store the sum value of Opportunity records filtered by conditions like: certain user + current month.

      Is it possible to achieve this?

      Thanks again.

      Comment


      • #4
        Hello,
        if you have the "must have" AdvancedPack .. yes
        else, you can do.. i think so :
        create a readOnly field "float:sumAmount" in user entity
        with formula, sumRelated( ..... lastMonth ).. certainly need to make a filter.

        Comment


        • #5
          Originally posted by item View Post
          Hello,
          if you have the "must have" AdvancedPack .. yes
          else, you can do.. i think so :
          create a readOnly field "float:sumAmount" in user entity
          with formula, sumRelated( ..... lastMonth ).. certainly need to make a filter.
          Yes I have Advanced Pack.

          But how can I apple the formula entity\sumRelated(LINK, FIELD, FILTER) in the same entity? What "LINK" name shall I put into the formula?

          Thanks.

          Comment


          • #6
            like so ?
            i don't use opportuinity so filter must certainly another date field

            Comment


            • #7
              Originally posted by item View Post
              like so ?
              i don't use opportuinity so filter must certainly another date field
              Yes using report function it is easy to get the sum value. What I want to do is to set a field to store all the sum value of the "amount" of records created in a month......

              Thanks.

              Comment


              • #8
                It is not possible to get the sum value of the records of the same entity of a certain period via UI. I believe it is possible to achieve with Hook https://docs.espocrm.com/development/hooks/.

                Comment


                • #9
                  Originally posted by Maximus View Post
                  It is not possible to get the sum value of the records of the same entity of a certain period via UI. I believe it is possible to achieve with Hook https://docs.espocrm.com/development/hooks/.
                  got it. thanks very much.

                  Comment

                  Working...
                  X