Compound calculations?

Viewing 2 reply threads
  • Author
    Posts
  • May 4, 2020 at 5:09 PM #40454

    Vera Milosavich
    Participant

    Is it possible to nest calculation formulas? For instance:

    IF ((A=B OR C=D AND E=F);X;Y)

    I don’t see any OR or AND type functions in calculations. Is there a different way of accomplishing this?

    I’m utterly clueless in Javascript so I’m hoping that isn’t the only answer. If it is, I’m afraid I won’t be able to set up half the calculations I need.

    May 5, 2020 at 12:32 AM #40462

    Brendan
    Keymaster

    Hi Vera,

    With an IF() expression, you can use & for AND and ~ for OR.

    so IF((A=B ~ C=D & E=F); X; Y)

    The operators are mentioned in the Calculations topic in the online user manual:

    https://www.tapforms.com/help-mac/5.3/en/topic/calculation

    But for complex operations I usually prefer to use a Script Field instead of a Calculation Field. You can do so much more with Script Fields.

    May 5, 2020 at 1:51 AM #40474

    Vera Milosavich
    Participant

    Thank you for the info. I did look through the manual but either I overlooked that or misunderstood the use.

    I have no doubt that scripts can do much more, but I can’t devote the amount of time to learning this for just a handful of uses.

Viewing 2 reply threads

You must be logged in to reply to this topic.