I have calculated fields based off related modules. My understanding is that those calculated fields automatically re-calculate but I'm finding that only certain calculations are recalculating. When I select all, I do have the option to recalculate val

I have calculated fields based off related modules. My understanding is that those calculated fields automatically re-calculate but I'm finding that only certain calculations are recalculating. When I select all, I do have the option to recalculate values but we have tons of calculations and even that mass re-calculate function would be time consuming. Any ideas on why all the fields are not automatically re-calculating?

Parents
  • Hi Kaylee Heap,

    Here are a few details that can help readers further consider the stated issue:

    1. In what module is the calculated field?
    2. What is the related module?
    3. What is the formula?
    4. Is the relationship many-to-many, one-to-many, or one-to-one?
    5. Is the relationship a stock relationship or a custom relationship?
    6. What field, and what field type, is the formula in?
  • 1. The calculated field is in a custom module I made, Fuel Price.

    2. The related module is also a custom module I made, Estimated Fuel Cost.

    3. The formula is:

    multiply(related($fpc_fuel_price_efc1_est_freight_cost,"fuel_surcharge_c"),
    add(
    multiply(
    divide(
    multiply(related($fpc_fuel_price_efc1_est_freight_cost,"west_hourly_c"),
    divide(
    multiply($miles_c,2),related($fpc_fuel_price_efc1_est_freight_cost,"miles_per_hour_c"))),950),100),

    ifElse(equal(related($sfrv1_storage_facility_efc1_est_freight_cost_1,"name"),""),
    multiply(
    divide(multiply(related($fpc_fuel_price_efc1_est_freight_cost,"west_hourly_c"),.5),950),100),
    multiply(
    divide(
    multiply(related($sfrv1_storage_facility_efc1_est_freight_cost_1,"est_load_time_c"),related($fpc_fuel_price_efc1_est_freight_cost,"west_hourly_c")),950),100)),

    ifElse(equal(related($l1_locations_efc1_est_freight_cost_1,"name"),""),
    multiply(
    divide(multiply(related($fpc_fuel_price_efc1_est_freight_cost,"west_hourly_c"),.5),950),100),
    multiply(
    divide(
    multiply(related($l1_locations_efc1_est_freight_cost_1,"average_dump_time_c"),related($fpc_fuel_price_efc1_est_freight_cost,"west_hourly_c")),950),100)

    ))
    )

    4. Fuel Price is one-to-many Estimated Freight Cost

    5. Custom Relationship

    6. Decimal field type

  • I have seen this before with calculated fields on relationships where there are many related records. What can be more troublesome is if any of the related records have any calculated fields that are updated off of either of the other related modules. This turns into a loop and not all the calculations happen before a timeout. 

    I'm not saying for certain this is what is going on but it sounds just like something I have experienced in the past. Sometimes it can help to break the calculation down into some pieces. Especially if once set some fields do not change. 

    I'd start with breaking the formula down into smaller bits using hidden fields. Hopefully that will improve things. Otherwise a bit of customization may be required.

Reply
  • I have seen this before with calculated fields on relationships where there are many related records. What can be more troublesome is if any of the related records have any calculated fields that are updated off of either of the other related modules. This turns into a loop and not all the calculations happen before a timeout. 

    I'm not saying for certain this is what is going on but it sounds just like something I have experienced in the past. Sometimes it can help to break the calculation down into some pieces. Especially if once set some fields do not change. 

    I'd start with breaking the formula down into smaller bits using hidden fields. Hopefully that will improve things. Otherwise a bit of customization may be required.

Children
No Data