1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Calc retrieved in calc in repeating groups

Discussion in 'Community' started by Trembowiecki, Aug 8, 2022.

  1. Trembowiecki

    Trembowiecki Member

    Level: Community

    I've just spotted a problem that bugs me big time. Let's say we have two calc elements (both with 'Ajax calculation' and 'Calc on load' switch on):

    1) table1___element1:
    Code (Text):
    return 'whatever';
    2) table1___element2:
    Code (Text):
    $value1 = '{table1___element1}';
    return $value1;
    When it's a non-repeating group - all fine, second calc displays 1st calc's value. BUT whet you put the same two calcs in a repeating group - there is no way the second element displays anything. It will save the correct value in database however, but when you open the form again, the saved value disappears and again it's just an empty string.

    I'm lost. What am I doing wrong?
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    You can't use a calc in a calc, it's random which is calculated first.
  3. Trembowiecki

    Trembowiecki Member

    Level: Community
    Thanks. I thought I was missing something. So... workaround!

Share This Page