Announcement

Collapse
No announcement yet.

entity\ any formulas not working

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

  • entity\ any formulas not working

    Hi,

    I try to calculate the sum in another table and count the number of records, but I don't get the results.
    Why don't working any formulas entity\ (sumRelated and countRelated) for counting in other tables? may be due Relationships? Or am I doing something wrong?


  • #2
    did you add the report as a filter to your entity?
    You need to create a report filter based on this report (Administration -> Report Filters) and use the report filter ID in the formula instead of the report ID.
    Rabii
    Web Dev

    Comment


    • #3
      yes i added ReportFilter now and got number /#ReportFilter/view/6396d8023ec542034

      changed the formula
      ilosc = entity\isRelated('Wynagrodzenie', 'kwota');
      summ = entity\sumRelated('Wynagrodzenie', 'kwota', 'reportFilter6396d8023ec542034');​

      the formula doesn't work again

      type of fields ilosc and summ is Varchar, read-only is true.

      Comment


      • #4
        just check the relationship link name and also try to recalculate formula.
        Rabii
        Web Dev

        Comment


        • #5
          Hi Vasyl Kasiianchuk,

          1. Create a relationship between Wynagrodzenie and Lista Plac.
          2. Instead of the word Wynagrodzenie, there should be the name of the relationship with the entity Lista Plac.
          3. For example, if we want to calculate the amount of associated Opportunities for an Account, then we write

          no:
          Code:
          entity\sumRelated('Opportunity', 'amount');
          yes:
          Code:
          entity\sumRelated('opportunities', 'amount');
          4.​ Recalculate formula.
          Attached Files

          Comment


          • Vasyl Kasiianchuk
            Vasyl Kasiianchuk commented
            Editing a comment
            Hi, Victor. Thank you very much, now I understand that I need to specify the name of the link, not the Entity

            summ = entity\sumRelated('wynagrodzenies', 'kwota', 'reportFilter6396d8023ec542034');

        • #6
          deleted and re-created the relationship, perhaps I need to add additional relationship?

          Comment


          • #7
            Thanks victor and rabii for your help
            working great
            Last edited by Vasyl Kasiianchuk; 12-12-2022, 07:37 PM.

            Comment

            Working...
            X