2

Thanks in advance.

I have a process builder which will update 5 different fields as an update action Once the user gives Year1 and x value it should calculate the values for all other year fields. But only year 2,4 are updated on the first update and when I edit and save then the year 3 is updated.

  • Field "Year1"= Manual entry
  • Field "Year2"= Year1+x
  • Field "Year3"= Year2+x
  • Field "Year4"= Year3+x

My formula is

Year2 = IF (x=0, 0, IF (x>0, IF (x<0.10001, year1* (1+x), year1+x),0))
Year3 = IF (x=0, 0, IF (x>0, IF (x<0.10001, year2* (1+x), year2+x),0))
Year4 = IF (x=0, 0, IF (x>0, IF (x<0.10001, year3* (1+x), year3+x),0))

enter image description here enter image description here

1

All of the values are calculated as if they were calculated simultaneously. In order to get around this, click on the Object node, click on the Advanced accordion component, and check "Yes" to allow recursion. This should solve your problem. If not, you'll need to make them separate steps/criteria or perform the entire calculation for each field independently without reference to other fields that are being updated.

2
  • Thank you, it's working as expected. But its updating 9 years values in series and not the 10th Year. Can you help with this? Year1 $25.00 Year2 $25.75 Year 3 $26.52 Year4 $27.32 Year5 $28.14 Year 6 $28.98 Year 7 $29.85 Year 8 $30.74 Year 9 $31.67 Year 10 $0.00 – Abby Mar 14 '19 at 17:47
  • @Abby You would need to check the debug logs. It's likely you hit the maximum recursion limit or you have some other problem in the configuration. Honestly, you might be better off with a flow so that you can precisely control the calculations. – sfdcfox Mar 14 '19 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.