Does sequence in formula matter?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1602

    Does sequence in formula matter?

    As the title says, I have been asking myself, if the sequence in formulas matter. E.g. is it important to put formulas, that make calculations of fields in the beginning of a detail view, also in the beginning of the formulas?
    And inside , e.g. a IfThen formula, is the sequence important?

    I am asking this, because I have some formulas, thet require two or three times of recalculation when they are activated. Or is that because of any other reason?
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    Logically thinking; I would say the first line of formula will get run before the second line. I don't see how it would be design otherwise; I don't think we have "AI" formula yet where it only do what is needed.

    Comment

    • item
      Active Community Member
      • Mar 2017
      • 1476

      #3
      Hello,
      formula is : beforeSave ..

      so in detail view .. no .. you put calculed field where you will
      in formula.. yes there are order .. and important

      in very basic for understand :
      a = fieldA
      b = a
      is not same as
      b = a
      a = fieldA

      same with ifThen and so.

      detail view is just render data from database
      formula... put value in field in database..

      so you need in formula "sequence/order" just

      other word : it's front end (view) ... it's back end formula
      If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1602

        #4
        Hi, it is totally right to have the correct sequence. I adjusted my formulas in this way and now it works much better. Side effect: You will find mistakes
        so rule 1: sequence of formulas according to order in your view
        rule 2: sequence inside ifThen formulas important one after another as necessary.

        Comment

        Working...