Formula Help - ifThenElse looking for 2 qualifiers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PhotoMommie
    Member
    • Dec 2019
    • 47

    Formula Help - ifThenElse looking for 2 qualifiers

    Maximus Another fun formula question!

    I have an ifThen formula that defines a color code, but I need it to include another factor:

    Current working code: ifThen(finish == 'NATURAL', series = '1'; colorCode = '1');

    I need it to actually reflect another variable. If the Finish = Natural AND modifierCode = null, then series = '1'; colorCode = '1', ELSE series code = '3', colorCode = '1'

    How do I write this??
  • PhotoMommie
    Member
    • Dec 2019
    • 47

    #2
    Ima dork, I figured it out:

    ifThenElse(finish == 'NATURAL' && modifierCode == null, series = '1'; colorCode = '1', series = '3'; colorCode = '1');

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      I recommend to write it in the following form:

      Code:
      ifThenElse(
          finish == 'NATURAL && modifierCode == null,
          serias = '1'; colorCode = '1',
          series = '3'; colorCode = '1'
      );

      Better for reading.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...